diff options
-rw-r--r-- | include/clang/AST/CommentCommands.td | 1 | ||||
-rw-r--r-- | test/Sema/warn-documentation.cpp | 8 |
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); |