forked from OSchip/llvm-project
Fix a non-error diagnostic that had an err_ name. Also move it from Warning to
ExtWarn, since it's an extension. llvm-svn: 201540
This commit is contained in:
parent
11e32d3db4
commit
7b1573451e
|
@ -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<
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue