]> granicus.if.org Git - clang/commitdiff
[doc parsing]: Make warning about unknown command
authorFariborz Jahanian <fjahanian@apple.com>
Sat, 4 May 2013 00:47:28 +0000 (00:47 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Sat, 4 May 2013 00:47:28 +0000 (00:47 +0000)
tags off by default for now. Move diagnostic code
to DiagnosticCommentKinds.td. // rdar://12381408

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

include/clang/Basic/DiagnosticCommentKinds.td
include/clang/Basic/DiagnosticLexKinds.td
lib/AST/CommentLexer.cpp

index 3880e0e5b4fa94e24698161a1c9b6a76d8e340c7..3df03cdb331536f5b59e86421600907e31228ad0 100644 (file)
@@ -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
index fb0ab3c1a441cc11c7284a0684ed8190193f1370..548823f1f0b84f5ad1d612e78d22cc0573381ae8 100644 (file)
@@ -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
+}
index 82efac64ff5f5b46f5e968248ee62db007c67ac6..70410d61085dfbf22b3c49b6a8d619508d17c3d8 100644 (file)
@@ -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) {