]> granicus.if.org Git - clang/commitdiff
Documentation parsing: recognize \relates, \related, \relatesonly, \relatedonly
authorDmitri Gribenko <gribozavr@gmail.com>
Sun, 23 Jun 2013 23:33:14 +0000 (23:33 +0000)
committerDmitri Gribenko <gribozavr@gmail.com>
Sun, 23 Jun 2013 23:33:14 +0000 (23:33 +0000)
so that -Wdocumentation-unknown-command does not warn on these commands.
Fixes PR16092.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184676 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 8c88494e9ae4ae89668a9d999b03427c2477f674..56944add2abc167686457daf44a49a77c51b29f9 100644 (file)
@@ -200,6 +200,11 @@ def Mainpage : VerbatimLineCommand<"mainpage">;
 def Subpage  : VerbatimLineCommand<"subpage">;
 def Ref      : VerbatimLineCommand<"ref">;
 
+def Relates     : VerbatimLineCommand<"relates">;
+def Related     : VerbatimLineCommand<"related">;
+def RelatesAlso : VerbatimLineCommand<"relatesalso">;
+def RelatedAlso : VerbatimLineCommand<"relatedalso">;
+
 //===----------------------------------------------------------------------===//
 // DeclarationVerbatimLineCommand
 //===----------------------------------------------------------------------===//
index 8eb21a60a0687dd7ca916474f88b20a29b963798..21b8dcb0d244944020b2735fd86fb07d04e3f631 100644 (file)
@@ -588,6 +588,25 @@ int test4; ///< \brief
            ///< \author Aaa
 
 
+class TestRelates {};
+
+/// \relates TestRelates
+/// \brief Aaa
+void test_relates_1();
+
+/// \related TestRelates
+/// \brief Aaa
+void test_relates_2();
+
+/// \relatesalso TestRelates
+/// \brief Aaa
+void test_relates_3();
+
+/// \relatedalso TestRelates
+/// \brief Aaa
+void test_relates_4();
+
+
 // Check that we attach the comment to the declaration during parsing in the
 // following cases.  The test is based on the fact that we don't parse
 // documentation comments that are not attached to anything.