]> granicus.if.org Git - clang/commitdiff
Fix a non-error diagnostic that had an err_ name. Also move it from Warning to
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 18 Feb 2014 00:45:50 +0000 (00:45 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 18 Feb 2014 00:45:50 +0000 (00:45 +0000)
ExtWarn, since it's an extension.

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

include/clang/Basic/DiagnosticLexKinds.td
lib/Lex/TokenLexer.cpp

index 4607eb053258472a66cb9398a1785eab8ace25ee..16ac94f3d1308b2b3a3d59be7e2472336d20ec59 100644 (file)
@@ -494,7 +494,7 @@ def err_too_few_args_in_macro_invoc : Error<
   "too few arguments provided to function-like macro invocation">;
 def err_pp_bad_paste : Error<
   "pasting formed '%0', an invalid preprocessing token">;
-def err_pp_bad_paste_ms : Warning<
+def ext_pp_bad_paste_ms : ExtWarn<
   "pasting formed '%0', an invalid preprocessing token">, DefaultError,
   InGroup<DiagGroup<"invalid-token-paste">>;
 def err_pp_operator_used_as_macro_name : Error<
index 9913f3087a1aa07de980d6f565289f1532adbfb2..316fba76ccd0d10dd4be3181b8c16582cc4361a8 100644 (file)
@@ -616,12 +616,11 @@ bool TokenLexer::PasteTokens(Token &Tok) {
           SourceLocation Loc =
             SM.createExpansionLoc(PasteOpLoc, ExpandLocStart, ExpandLocEnd, 2);
           // If we're in microsoft extensions mode, downgrade this from a hard
-          // error to a warning that defaults to an error.  This allows
+          // error to an extension that defaults to an error.  This allows
           // disabling it.
-          PP.Diag(Loc,
-                  PP.getLangOpts().MicrosoftExt ? diag::err_pp_bad_paste_ms 
-                                                   : diag::err_pp_bad_paste)
-            << Buffer.str();
+          PP.Diag(Loc, PP.getLangOpts().MicrosoftExt ? diag::ext_pp_bad_paste_ms
+                                                     : diag::err_pp_bad_paste)
+              << Buffer.str();
         }
 
         // An error has occurred so exit loop.