summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-05-04 00:47:28 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-05-04 00:47:28 +0000
commit6738e430a9919f5a94893ade27c2845f89c2938d (patch)
tree071501fb9c0d42235ede2edd4738ad7249fca8ba
parentfe806906d46ffe2b9acae8feef33715a7d417240 (diff)
downloadbcm5719-llvm-6738e430a9919f5a94893ade27c2845f89c2938d.tar.gz
bcm5719-llvm-6738e430a9919f5a94893ade27c2845f89c2938d.zip
[doc parsing]: Make warning about unknown command
tags off by default for now. Move diagnostic code to DiagnosticCommentKinds.td. // rdar://12381408 llvm-svn: 181081
-rw-r--r--clang/include/clang/Basic/DiagnosticCommentKinds.td3
-rw-r--r--clang/include/clang/Basic/DiagnosticLexKinds.td6
-rw-r--r--clang/lib/AST/CommentLexer.cpp5
3 files changed, 6 insertions, 8 deletions
diff --git a/clang/include/clang/Basic/DiagnosticCommentKinds.td b/clang/include/clang/Basic/DiagnosticCommentKinds.td
index 3880e0e5b4f..3df03cdb331 100644
--- a/clang/include/clang/Basic/DiagnosticCommentKinds.td
+++ b/clang/include/clang/Basic/DiagnosticCommentKinds.td
@@ -156,5 +156,8 @@ def warn_verbatim_block_end_without_start : Warning<
"'%select{\\|@}0%1' command does not terminate a verbatim text block">,
InGroup<Documentation>, DefaultIgnore;
+def warn_unknown_comment_command_name : Warning<
+ "unknown command tag name">, InGroup<Documentation>, DefaultIgnore;
+
} // end of documentation issue category
} // end of AST component
diff --git a/clang/include/clang/Basic/DiagnosticLexKinds.td b/clang/include/clang/Basic/DiagnosticLexKinds.td
index fb0ab3c1a44..548823f1f0b 100644
--- a/clang/include/clang/Basic/DiagnosticLexKinds.td
+++ b/clang/include/clang/Basic/DiagnosticLexKinds.td
@@ -27,10 +27,6 @@ def backslash_newline_space : Warning<
"backslash and newline separated by space">,
InGroup<DiagGroup<"backslash-newline-escape">>;
-// comment parsing
-def warn_unknown_comment_command_name : Warning<
- "unknown command tag name">, InGroup<DiagGroup<"comment-command-tag">>;
-
// Digraphs.
def warn_cxx98_compat_less_colon_colon : Warning<
"'<::' is treated as digraph '<:' (aka '[') followed by ':' in C++98">,
@@ -590,4 +586,4 @@ def warn_uncovered_module_header : Warning<
def err_expected_id_building_module : Error<
"expected a module name in '__building_module' expression">;
-} \ No newline at end of file
+}
diff --git a/clang/lib/AST/CommentLexer.cpp b/clang/lib/AST/CommentLexer.cpp
index 82efac64ff5..70410d61085 100644
--- a/clang/lib/AST/CommentLexer.cpp
+++ b/clang/lib/AST/CommentLexer.cpp
@@ -1,6 +1,6 @@
#include "clang/AST/CommentLexer.h"
-#include "clang/Lex/LexDiagnostic.h"
#include "clang/AST/CommentCommandTraits.h"
+#include "clang/AST/CommentDiagnostic.h"
#include "clang/Basic/CharInfo.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSwitch.h"
@@ -354,8 +354,7 @@ void Lexer::lexCommentText(Token &T) {
if (!Info) {
formTokenWithChars(T, TokenPtr, tok::unknown_command);
T.setUnknownCommandName(CommandName);
- Diag(T.getLocation(),
- diag::warn_unknown_comment_command_name);
+ Diag(T.getLocation(), diag::warn_unknown_comment_command_name);
return;
}
if (Info->IsVerbatimBlockCommand) {
OpenPOWER on IntegriCloud