llvm-project/clang/unittests
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
..
AST Enable comment parsing and semantic analysis to emit diagnostics. A few 2012-07-11 21:38:39 +00:00
ASTMatchers Add more matchers and do cleanups. 2012-07-10 20:20:19 +00:00
Basic Clang side of a refactoring of the CMake unit test build strategy. 2012-06-21 09:51:42 +00:00
Frontend Update unittests for include change. 2012-07-04 20:33:53 +00:00
Lex Clang side of a refactoring of the CMake unit test build strategy. 2012-06-21 09:51:42 +00:00
Tooling Adapts the FrontendAction convenience functions so that it can be 2012-07-05 18:13:01 +00:00
CMakeLists.txt Adds the AST Matcher library, which provides a in-C++ DSL to express 2012-07-06 05:48:52 +00:00
Makefile Adds the AST Matcher library, which provides a in-C++ DSL to express 2012-07-06 05:48:52 +00:00