[cfe-commits] r163905 - in /cfe/trunk: include/clang/AST/CommentCommands.td test/Sema/warn-documentation.cpp

Dmitri Gribenko gribozavr at gmail.com
Fri Sep 14 08:37:29 PDT 2012


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 at +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);





More information about the cfe-commits mailing list