]> granicus.if.org Git - clang/commitdiff
Comment parsing: support the "\invariant" command.
authorDmitri Gribenko <gribozavr@gmail.com>
Fri, 14 Sep 2012 15:37:29 +0000 (15:37 +0000)
committerDmitri Gribenko <gribozavr@gmail.com>
Fri, 14 Sep 2012 15:37:29 +0000 (15:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163905 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/CommentCommands.td
test/Sema/warn-documentation.cpp

index 787a0161abfc3651571866593f703081ba1968a6..f2a6744c95886ade3127811f29afbc7d4708d11d 100644 (file)
@@ -83,6 +83,7 @@ def Bug        : BlockCommand<"bug">;
 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">;
index a18a0a44a4ed85ca8e8acddd110c07429db47b60..2c8207b8aef5095539e72154bcb5df98bf707701 100644 (file)
@@ -384,6 +384,14 @@ void test_deprecated_1(int a);
 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);