aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/PPMacroExpansion.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-19 20:54:25 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-19 20:54:25 +0000
commita25b6a4b43e8b9611f7506e5fe1b448833b10a46 (patch)
tree1c8c6e68f978b9b156704e77c31beb8bf573b845 /lib/Lex/PPMacroExpansion.cpp
parentb95cfe4bb01f18a112bcb7eea3b82bc8d6dfe20b (diff)
Don't warn for empty 'if' body if there is a macro that expands to nothing, e.g:
if (condition) CALL(0); // empty macro but don't warn for empty body. Fixes rdar://8436021. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119838 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPMacroExpansion.cpp')
-rw-r--r--lib/Lex/PPMacroExpansion.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp
index 2428f9af45..6d2c387d52 100644
--- a/lib/Lex/PPMacroExpansion.cpp
+++ b/lib/Lex/PPMacroExpansion.cpp
@@ -176,6 +176,7 @@ bool Preprocessor::isNextPPTokenLParen() {
/// expanded as a macro, handle it and return the next token as 'Identifier'.
bool Preprocessor::HandleMacroExpandedIdentifier(Token &Identifier,
MacroInfo *MI) {
+ MacroExpansionFlag = true;
if (Callbacks) Callbacks->MacroExpands(Identifier, MI);
// If this is a macro expansion in the "#if !defined(x)" line for the file,