From: Richard Smith Date: Tue, 18 Feb 2014 00:45:50 +0000 (+0000) Subject: Fix a non-error diagnostic that had an err_ name. Also move it from Warning to X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f1f62b816872e5bd7b926c096d32a030c3e8fbb0;p=clang Fix a non-error diagnostic that had an err_ name. Also move it from Warning to ExtWarn, since it's an extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201540 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticLexKinds.td b/include/clang/Basic/DiagnosticLexKinds.td index 4607eb0532..16ac94f3d1 100644 --- a/include/clang/Basic/DiagnosticLexKinds.td +++ b/include/clang/Basic/DiagnosticLexKinds.td @@ -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>; def err_pp_operator_used_as_macro_name : Error< diff --git a/lib/Lex/TokenLexer.cpp b/lib/Lex/TokenLexer.cpp index 9913f3087a..316fba76cc 100644 --- a/lib/Lex/TokenLexer.cpp +++ b/lib/Lex/TokenLexer.cpp @@ -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.