History log of /llvm-project/clang/lib/AST/CommentParser.cpp (Results 26 – 47 of 47)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 696d7226 19-Dec-2012 Dmitri Gribenko <gribozavr@gmail.com>

Comment parsing: add a missing 'else'. Found by inspection.

No testcase because we were just building an extra AST node and eventually
throwing it away, so it did not affect correctness.

llvm-svn:

Comment parsing: add a missing 'else'. Found by inspection.

No testcase because we were just building an extra AST node and eventually
throwing it away, so it did not affect correctness.

llvm-svn: 170563

show more ...


Revision tags: llvmorg-3.2.0-rc3
# 3a02247d 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com>

Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.

This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/util

Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.

This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.

I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.

llvm-svn: 169237

show more ...


Revision tags: llvmorg-3.2.0-rc2
# 76b91c34 18-Nov-2012 Dmitri Gribenko <gribozavr@gmail.com>

Documentation parsing: propely handle a lone '\endverbatim' and emit a warning.

We actually used to assert on this.

Thanks to NAKAMURA Takumi for noticing this!

llvm-svn: 168277


Revision tags: llvmorg-3.2.0-rc1
# 9304d863 11-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com>

Comment parsing: handle non-builtin commands correctly. After semantic
analysis registers a command, it becomes a "known" command for the lexer, since
it has an ID. Having this freedom of choice to

Comment parsing: handle non-builtin commands correctly. After semantic
analysis registers a command, it becomes a "known" command for the lexer, since
it has an ID. Having this freedom of choice to register a command is a good
thing since BriefParser does not need this.

But the parser should still invoke the correct semantic analysis method
(actOnUnknownCommand) in this case.

llvm-svn: 163646

show more ...


# 7acbf00f 10-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com>

Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.

Now we have a list of all commands. This is a good thing in itself, but it
also enables us to easily implement typo correcti

Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.

Now we have a list of all commands. This is a good thing in itself, but it
also enables us to easily implement typo correction for command names.

With this change we have objects that contain information about each command,
so it makes sense to resolve command name just once during lexing (currently we
store command names as strings and do a linear search every time some property
value is needed). Thus comment token and AST nodes were changed to contain a
command ID -- index into a tables of builtin and registered commands. Unknown
commands are registered during parsing and thus are also uniformly assigned an
ID. Using an ID instead of a StringRef is also a nice memory optimization
since ID is a small integer that fits into a common bitfield in Comment class.

This change implies that to get any information about a command (even a command
name) we need a CommandTraits object to resolve the command ID to CommandInfo*.
Currently a fresh temporary CommandTraits object is created whenever it is
needed since it does not have any state. But with this change it has state --
new commands can be registered, so a CommandTraits object was added to
ASTContext.

Also, in libclang CXComment has to be expanded to include a CXTranslationUnit
so that all functions working on comment AST nodes can get a CommandTraits
object. This breaks binary compatibility of CXComment APIs.

Now clang_FullComment_getAsXML(CXTranslationUnit TU, CXComment CXC) doesn't
need TU parameter anymore, so it was removed. This is a source-incompatible
change for this C API.

llvm-svn: 163540

show more ...


# ca7f80ad 09-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com>

Comment parsing: extract TableGen'able pieces into new CommandTraits class.

llvm-svn: 161548


# 6297fa8a 06-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com>

Comment parsing: fix crash on \tparam followed immediately by another block
command, for example: \tparam\brief.

llvm-svn: 161361


# a9770ad8 06-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com>

Comment parser and sema: remove useless return values

llvm-svn: 161331


# 34df2204 31-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com>

Comment parsing: add support for \tparam command on all levels.

The only caveat is renumbering CXCommentKind enum for aesthetic reasons -- this
breaks libclang binary compatibility, but should not b

Comment parsing: add support for \tparam command on all levels.

The only caveat is renumbering CXCommentKind enum for aesthetic reasons -- this
breaks libclang binary compatibility, but should not be a problem since API is
so new.

This also fixes PR13372 as a side-effect.

llvm-svn: 161087

show more ...


# 1ba47ca4 30-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com>

Comment parser: don't crash on a completely empty \param followed by a block
command

llvm-svn: 160975


# 35b0c09b 24-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com>

Comment parsing: allow newlines between \param, direction specification (e.g.,
[in]), parameter name and description paragraph.

llvm-svn: 160682


# 0a36302a 24-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com>

Comment parsing: couple TextTokenRetokenizer and comment parser together to
remove one of the two variable-length lookahead buffers. Now retokenizer will
ask for more tokens when it needs them.

llv

Comment parsing: couple TextTokenRetokenizer and comment parser together to
remove one of the two variable-length lookahead buffers. Now retokenizer will
ask for more tokens when it needs them.

llvm-svn: 160680

show more ...


# 1bfd9dad 24-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com>

Move TextTokenRetokenizer from CommentLexer.h to CommentParser.cpp since it is
an implementation detail of the parser.

llvm-svn: 160679


# 1c85d5b1 24-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com>

Comment parsing: retokenized text tokens are now pushed back in correct (not
reverse) order

llvm-svn: 160675


# 66a00c76 20-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com>

Fix PR13411: Comment parsing: failed assertion on unterminated verbatim block.

The assertion was wrong in case we have a verbatim block without a closing
command.

Also add tests for closing command

Fix PR13411: Comment parsing: failed assertion on unterminated verbatim block.

The assertion was wrong in case we have a verbatim block without a closing
command.

Also add tests for closing command name in a verbatim block, since now it can
be empty in such cases.

llvm-svn: 160568

show more ...


# b03cc7e9 18-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com>

This fits into 80 columns without wrapping.

llvm-svn: 160453


# e00ffc7b 13-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com>

Comment parsing: repaint the bikesched: rename 'HTML open tags' to 'HTML start tags' and 'HTML close tags' to 'HTML end tags' according to HTML spec.

llvm-svn: 160153


# f26054f0 11-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com>

Enable comment parsing and semantic analysis to emit diagnostics. A few
diagnostics implemented -- see testcases.

I created a new TableGen file for comment diagnostics,
DiagnosticCommentKinds.td, b

Enable comment parsing and semantic analysis to emit diagnostics. A few
diagnostics implemented -- see testcases.

I created a new TableGen file for comment diagnostics,
DiagnosticCommentKinds.td, because comment diagnostics don't logically
fit into AST diagnostics file. But I don't feel strongly about it.

This also implements support for self-closing HTML tags in comment
lexer and parser (for example, <br />).

In order to issue precise diagnostics CommentSema needs to know the
declaration the comment is attached to. There is no easy way to find a decl by
comment, so we match comments and decls in lockstep: after parsing one
declgroup we check if we have any new, not yet attached comments. If we do --
then we do the usual comment-finding process.

It is interesting that this automatically handles trailing comments.
We pick up not only comments that precede the declaration, but also
comments that *follow* the declaration -- thanks to the lookahead in
the lexer: after parsing the declgroup we've consumed the semicolon
and looked ahead through comments.

Added -Wdocumentation-html flag for semantic HTML errors to allow the user to
disable only HTML warnings (but not HTML parse errors, which we emit as
warnings in -Wdocumentation).

llvm-svn: 160078

show more ...


# 4106ea3b 06-Jul-2012 Matt Beaumont-Gay <matthewbg@google.com>

Sprinkle llvm_unreachable around to placate GCC's -Wreturn-type.

llvm-svn: 159860


# bacb9f65 06-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com>

Stop using new[] on llvm::BumpPtrAllocator.

llvm-svn: 159833


# 017b6777 06-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com>

CommentParser.cpp: remove unused variable.

llvm-svn: 159797


# ec92531c 06-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com>

Implement AST classes for comments, a real parser for Doxygen comments and a
very simple semantic analysis that just builds the AST; minor changes for lexer
to pick up source locations I didn't think

Implement AST classes for comments, a real parser for Doxygen comments and a
very simple semantic analysis that just builds the AST; minor changes for lexer
to pick up source locations I didn't think about before.

Comments AST is modelled along the ideas of HTML AST: block and inline content.

* Block content is a paragraph or a command that has a paragraph as an argument
or verbatim command.
* Inline content is placed within some block. Inline content includes plain
text, inline commands and HTML as tag soup.

llvm-svn: 159790

show more ...


12