aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2012-09-14 15:37:29 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2012-09-14 15:37:29 +0000
commit388a594cd04aae78be452f6eacb9ca6be239c1f8 (patch)
tree13b623772515273bdff53fcab915fd69542b2f92
parent7a9188833a6a09d574144334c9584c417b809007 (diff)
Comment parsing: support the "\invariant" command.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163905 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/CommentCommands.td1
-rw-r--r--test/Sema/warn-documentation.cpp8
2 files changed, 9 insertions, 0 deletions
diff --git a/include/clang/AST/CommentCommands.td b/include/clang/AST/CommentCommands.td
index 787a0161ab..f2a6744c95 100644
--- a/include/clang/AST/CommentCommands.td
+++ b/include/clang/AST/CommentCommands.td
@@ -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">;
diff --git a/test/Sema/warn-documentation.cpp b/test/Sema/warn-documentation.cpp
index a18a0a44a4..2c8207b8ae 100644
--- a/test/Sema/warn-documentation.cpp
+++ b/test/Sema/warn-documentation.cpp
@@ -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);