llvm-project/clang/lib/Sema
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
..
AnalysisBasedWarnings.cpp Thread safety analysis: fixed incorrect error message at the end of a locks_required function. 2012-07-02 22:16:54 +00:00
AttributeList.cpp Drop the ASTContext.h include from Stmt.h and fix up transitive users. 2012-07-04 17:04:04 +00:00
CMakeLists.txt Enable comment parsing and semantic analysis to emit diagnostics. A few 2012-07-11 21:38:39 +00:00
CodeCompleteConsumer.cpp Add a new libclang completion API to get brief documentation comment that is 2012-07-02 17:35:10 +00:00
DeclSpec.cpp Reapply r158700 and fixup patches, minus one hunk that slipped through and 2012-06-19 23:57:03 +00:00
DelayedDiagnostic.cpp objc: When issue diagnostic about deprecated method, also 2012-03-02 21:50:02 +00:00
IdentifierResolver.cpp Revert Decl's iterators back to pointer value_type rather than reference value_type 2012-06-06 20:45:41 +00:00
JumpDiagnostics.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
Scope.cpp Reapply r151638 and r151641. 2012-02-29 10:24:19 +00:00
Sema.cpp Renamed RawComment kinds to avoid name clash. 2012-07-04 07:30:26 +00:00
SemaAccess.cpp Drop the ASTContext.h include from Stmt.h and fix up transitive users. 2012-07-04 17:04:04 +00:00
SemaAttr.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
SemaCXXScopeSpec.cpp Move Sema::RequireCompleteType() and Sema::RequireCompleteExprType() 2012-05-04 16:32:21 +00:00
SemaCast.cpp Fix Sema and IRGen for atomic compound assignment so it has the right semantics when promotions are involved. 2012-06-16 02:19:17 +00:00
SemaChecking.cpp MIPS: Range check __builtin_mips_wrdsp / __builtin_mips_rddsp arguments against the upper/lower values. 2012-07-08 09:30:00 +00:00
SemaCodeComplete.cpp Add a new libclang completion API to get brief documentation comment that is 2012-07-02 17:35:10 +00:00
SemaConsumer.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
SemaDecl.cpp Enable comment parsing and semantic analysis to emit diagnostics. A few 2012-07-11 21:38:39 +00:00
SemaDeclAttr.cpp Patch by Anton Lokhmotov to add OpenCL work group size attributes. 2012-07-09 22:06:01 +00:00
SemaDeclCXX.cpp Enable comment parsing and semantic analysis to emit diagnostics. A few 2012-07-11 21:38:39 +00:00
SemaDeclObjC.cpp Enable comment parsing and semantic analysis to emit diagnostics. A few 2012-07-11 21:38:39 +00:00
SemaExceptionSpec.cpp Move Sema::RequireCompleteType() and Sema::RequireCompleteExprType() 2012-05-04 16:32:21 +00:00
SemaExpr.cpp Downgrade the "direct comparison" error for ObjC literals to a warning. 2012-07-09 16:54:44 +00:00
SemaExprCXX.cpp The delete argument should not be converted to void*. 2012-07-09 21:15:43 +00:00
SemaExprMember.cpp objective-c: If an ivar is (1) the first ivar in a root class and (2) named `isa`, 2012-06-21 21:35:15 +00:00
SemaExprObjC.cpp Warn on weak properties declared in protocols as well. 2012-06-28 16:39:28 +00:00
SemaFixItUtils.cpp Drop the ASTContext.h include from Stmt.h and fix up transitive users. 2012-07-04 17:04:04 +00:00
SemaInit.cpp PR12670: Support for initializing an array of non-aggregate class type from an 2012-07-07 08:35:56 +00:00
SemaLambda.cpp Split out the "empty" case for compound statement into a separate ctor. 2012-07-04 17:03:41 +00:00
SemaLookup.cpp Add support for the C11 _Alignof keyword. 2012-06-30 21:33:57 +00:00
SemaObjCProperty.cpp fix a typo in my last commit. I thought I recompiled, 2012-06-29 19:05:11 +00:00
SemaOverload.cpp Unrevert r158887, reverted in r158949, along with a fix for the bug which 2012-06-25 20:30:08 +00:00
SemaPseudoObject.cpp Change warning to error when property setter names conflict. 2012-05-26 16:10:06 +00:00
SemaStmt.cpp Inline storage of attributes in AttributedStmt. 2012-07-09 10:04:07 +00:00
SemaStmtAttr.cpp Inline storage of attributes in AttributedStmt. 2012-07-09 10:04:07 +00:00
SemaTemplate.cpp PR9793: Treat substitution as an instantiation step for the purpose of the 2012-07-08 02:38:24 +00:00
SemaTemplateDeduction.cpp PR13136: 2012-07-09 03:07:20 +00:00
SemaTemplateInstantiate.cpp PR13136: 2012-07-09 03:07:20 +00:00
SemaTemplateInstantiateDecl.cpp PR9793: Treat substitution as an instantiation step for the purpose of the 2012-07-08 02:38:24 +00:00
SemaTemplateVariadic.cpp For PR11916: Add support for g++'s __int128 keyword. Unlike __int128_t, this is 2012-04-04 06:24:32 +00:00
SemaType.cpp Reject 'int a[1][];' in Sema rather than crashing in IR generation. Found by a 2012-07-07 23:00:31 +00:00
TargetAttributesSema.cpp Reapply r158700 and fixup patches, minus one hunk that slipped through and 2012-06-19 23:57:03 +00:00
TargetAttributesSema.h Remove Sema.h's dependency on DeclCXX.h. 2010-08-25 07:42:41 +00:00
TreeTransform.h Inline storage of attributes in AttributedStmt. 2012-07-09 10:04:07 +00:00
TypeLocBuilder.h Remove more unnecessary #include <llvm/ADT/SmallVector.h> 2011-06-20 06:11:46 +00:00