summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/DiagnosticCommentKinds.td
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2012-08-03 21:15:32 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2012-08-03 21:15:32 +0000
commit89ab7d0012ffe02a335b765eeb9b48977a5ecd79 (patch)
treeefa56afcd5f2be0fbdec3449517e994710df9811 /include/clang/Basic/DiagnosticCommentKinds.td
parent5295b97d6a0117414a24d319d9a018191ec1d8e3 (diff)
Comment diagnostics: warn if \returns is used in a non-function comment or if
the function returns void. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161261 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticCommentKinds.td')
-rw-r--r--include/clang/Basic/DiagnosticCommentKinds.td12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticCommentKinds.td b/include/clang/Basic/DiagnosticCommentKinds.td
index 4aa812ebc1..7c13644926 100644
--- a/include/clang/Basic/DiagnosticCommentKinds.td
+++ b/include/clang/Basic/DiagnosticCommentKinds.td
@@ -98,5 +98,17 @@ def warn_doc_tparam_not_found : Warning<
def note_doc_tparam_name_suggestion : Note<
"did you mean '%0'?">;
+// \returns command
+
+def warn_doc_returns_not_attached_to_a_function_decl : Warning<
+ "'\\%0' command used in a comment that is not attached to "
+ "a function declaration">,
+ InGroup<Documentation>, DefaultIgnore;
+
+def warn_doc_returns_attached_to_a_void_function : Warning<
+ "'\\%0' command used in a comment that is attached to a "
+ "%select{void function|constructor|destructor}1">,
+ InGroup<Documentation>, DefaultIgnore;
+
} // end of documentation issue category
} // end of AST component