r181081 - [doc parsing]: Make warning about unknown command
Fariborz Jahanian
fjahanian at apple.com
Fri May 3 17:47:28 PDT 2013
Author: fjahanian
Date: Fri May 3 19:47:28 2013
New Revision: 181081
URL: http://llvm.org/viewvc/llvm-project?rev=181081&view=rev
Log:
[doc parsing]: Make warning about unknown command
tags off by default for now. Move diagnostic code
to DiagnosticCommentKinds.td. // rdar://12381408
Modified:
cfe/trunk/include/clang/Basic/DiagnosticCommentKinds.td
cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td
cfe/trunk/lib/AST/CommentLexer.cpp
Modified: cfe/trunk/include/clang/Basic/DiagnosticCommentKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticCommentKinds.td?rev=181081&r1=181080&r2=181081&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticCommentKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticCommentKinds.td Fri May 3 19:47:28 2013
@@ -156,5 +156,8 @@ def warn_verbatim_block_end_without_star
"'%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
Modified: cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td?rev=181081&r1=181080&r2=181081&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td Fri May 3 19:47:28 2013
@@ -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 : Warni
def err_expected_id_building_module : Error<
"expected a module name in '__building_module' expression">;
-}
\ No newline at end of file
+}
Modified: cfe/trunk/lib/AST/CommentLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CommentLexer.cpp?rev=181081&r1=181080&r2=181081&view=diff
==============================================================================
--- cfe/trunk/lib/AST/CommentLexer.cpp (original)
+++ cfe/trunk/lib/AST/CommentLexer.cpp Fri May 3 19:47:28 2013
@@ -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) {
More information about the cfe-commits
mailing list