diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-11 20:39:47 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-11 20:39:47 +0000 |
commit | 1f8dcfca6c57606b9f4f96404642c02562289b83 (patch) | |
tree | 38f0d4edccac14e7254b3e719a26db7c44572f25 /lib | |
parent | 6e8090356fdd160f05612f8c37dbfd36f75fc844 (diff) |
Don't warn for unused macro when undef'ing it, if it comes from an included file. rdar://9745065
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134919 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Lex/PPDirectives.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp index f74aad3c81..efa188f752 100644 --- a/lib/Lex/PPDirectives.cpp +++ b/lib/Lex/PPDirectives.cpp @@ -1594,7 +1594,7 @@ void Preprocessor::HandleUndefDirective(Token &UndefTok) { // If the macro is not defined, this is a noop undef, just return. if (MI == 0) return; - if (!MI->isUsed()) + if (!MI->isUsed() && MI->isWarnIfUnused()) Diag(MI->getDefinitionLoc(), diag::pp_macro_not_used); // If the callbacks want to know, tell them about the macro #undef. |