Hello,
could somebody please review and commit the atached patch for pr15610 (it
needs the patch for pr15610 applied first in order to apply cleanly). Thank
you.
--
Lubos Lunak
[email protected]
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp
index 09016a8..0164b47 100644
--- a/lib/Lex/PPDirectives.cpp
+++ b/lib/Lex/PPDirectives.cpp
@@ -2027,7 +2027,8 @@ void Preprocessor::HandleDefineDirective(Token &DefineTok,
// warn-because-unused-macro set. If it gets used it will be removed from set.
if (isInPrimaryFile() && // don't warn for include'd macros.
Diags->getDiagnosticLevel(diag::pp_macro_not_used,
- MI->getDefinitionLoc()) != DiagnosticsEngine::Ignored) {
+ MI->getDefinitionLoc()) !=
+ DiagnosticsEngine::Ignored && !MacroExpansionInDirectivesOverride) {
SourceManager &SM = getSourceManager();
PresumedLoc PLoc = SM.getPresumedLoc(MI->getDefinitionLoc());
// Do not warn if #line markers say it is not the main file.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits