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 | 2299889f87978b8b09e5c8f2d554143f8892c45b (patch) | |
tree | d314ee9ab324d8e2f0d589c9ae14a15b357c2d32 /clang/lib/Lex/PPDirectives.cpp | |
parent | a59dbea0174e7dff8c062e4950e2a83c7c2b8478 (diff) | |
download | bcm5719-llvm-2299889f87978b8b09e5c8f2d554143f8892c45b.tar.gz bcm5719-llvm-2299889f87978b8b09e5c8f2d554143f8892c45b.zip |
Don't warn for unused macro when undef'ing it, if it comes from an included file. rdar://9745065
llvm-svn: 134919
Diffstat (limited to 'clang/lib/Lex/PPDirectives.cpp')
-rw-r--r-- | clang/lib/Lex/PPDirectives.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index f74aad3c816..efa188f7529 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/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. |