diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Lex/PPDirectives.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index 3b7eaee3c91..e433b2cf1b9 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -2727,7 +2727,9 @@ void Preprocessor::HandleDefineDirective( /*Syntactic=*/LangOpts.MicrosoftExt)) Diag(MI->getDefinitionLoc(), diag::warn_pp_macro_def_mismatch_with_pch) << MacroNameTok.getIdentifierInfo(); - return; + // Issue the diagnostic but allow the change if msvc extensions are enabled + if (!LangOpts.MicrosoftExt) + return; } // Finally, if this identifier already had a macro defined for it, verify that |