Author: gribozavr
Date: Fri Sep 14 10:37:29 2012
New Revision: 163905

URL: http://llvm.org/viewvc/llvm-project?rev=163905&view=rev
Log:
Comment parsing: support the "\invariant" command.

Modified:
    cfe/trunk/include/clang/AST/CommentCommands.td
    cfe/trunk/test/Sema/warn-documentation.cpp

Modified: cfe/trunk/include/clang/AST/CommentCommands.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CommentCommands.td?rev=163905&r1=163904&r2=163905&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/CommentCommands.td (original)
+++ cfe/trunk/include/clang/AST/CommentCommands.td Fri Sep 14 10:37:29 2012
@@ -83,6 +83,7 @@
 def Copyright  : BlockCommand<"copyright">;
 def Date       : BlockCommand<"date">;
 def Details    : BlockCommand<"details">;
+def Invariant  : BlockCommand<"invariant">;
 def Note       : BlockCommand<"note">;
 def Post       : BlockCommand<"post">;
 def Pre        : BlockCommand<"pre">;

Modified: cfe/trunk/test/Sema/warn-documentation.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/warn-documentation.cpp?rev=163905&r1=163904&r2=163905&view=diff
==============================================================================
--- cfe/trunk/test/Sema/warn-documentation.cpp (original)
+++ cfe/trunk/test/Sema/warn-documentation.cpp Fri Sep 14 10:37:29 2012
@@ -384,6 +384,14 @@
 void test_deprecated_2(int a);
 
 
+/// \invariant aaa
+void test_invariant_1(int a);
+
+// expected-warning@+1 {{empty paragraph passed to '\invariant' command}}
+/// \invariant
+void test_invariant_2(int a);
+
+
 // no-warning
 /// \returns Aaa
 int test_returns_right_decl_1(int);


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to