From: Dmitri Gribenko Date: Fri, 14 Sep 2012 15:37:29 +0000 (+0000) Subject: Comment parsing: support the "\invariant" command. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=388a594cd04aae78be452f6eacb9ca6be239c1f8;p=clang Comment parsing: support the "\invariant" command. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163905 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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);