llvm-project/clang/tools
Dmitri Gribenko f26054f0fb 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
2012-07-11 21:38:39 +00:00
..
arcmt-test Remove a goofy CMake hack and use the standard CMake facilities to 2012-06-21 01:30:21 +00:00
c-arcmt-test Remove a goofy CMake hack and use the standard CMake facilities to 2012-06-21 01:30:21 +00:00
c-index-test Fix some memory leaks found by the static analyzer. Thanks to John Smith for running it over Clang. 2012-07-05 08:20:49 +00:00
clang-check Fix usage instructions for clang-check. 2012-07-11 15:05:24 +00:00
diag-build Add new tool 'diag-build' for showing enabled warnings in a project. 2012-06-18 21:31:37 +00:00
diagtool Enable comment parsing and semantic analysis to emit diagnostics. A few 2012-07-11 21:38:39 +00:00
driver Remove a goofy CMake hack and use the standard CMake facilities to 2012-06-21 01:30:21 +00:00
libclang Introduce a flag in SourceManager to treat non-system source files 2012-07-11 20:59:04 +00:00
scan-build [analyzer]scan-build: report the total number of steps analyzer performs 2012-06-22 22:08:12 +00:00
scan-view Fix call to send_error() in scan-view. An int error code is expected but a string was being sent. Patch by Andrew Price! 2011-02-21 19:26:48 +00:00
CMakeLists.txt Adds a tooling library. 2012-04-04 12:07:46 +00:00
Makefile Adds a tooling library. 2012-04-04 12:07:46 +00:00