diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-12-17 04:13:31 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-12-17 04:13:31 +0000 |
| commit | 2072fbd77550e5a45e38925f0cbb7bda12de3ebe (patch) | |
| tree | 79222733252def751f34d69377cda11e763274a2 /clang/lib/Lex | |
| parent | 97ea7d6fc932e03843907bc5656ffa685189de99 (diff) | |
| download | bcm5719-llvm-2072fbd77550e5a45e38925f0cbb7bda12de3ebe.tar.gz bcm5719-llvm-2072fbd77550e5a45e38925f0cbb7bda12de3ebe.zip | |
[PCH] Fix bug where we failed to update an identifier for a single token
macro expansion.
rdar://10588825
llvm-svn: 146818
Diffstat (limited to 'clang/lib/Lex')
| -rw-r--r-- | clang/lib/Lex/PPMacroExpansion.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index 20ebb40f534..5cd656527bd 100644 --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/lib/Lex/PPMacroExpansion.cpp @@ -116,6 +116,11 @@ static bool isTrivialSingleTokenExpansion(const MacroInfo *MI, // If the token isn't an identifier, it's always literally expanded. if (II == 0) return true; + // If the information about this identifier is out of date, update it from + // the external source. + if (II->isOutOfDate()) + PP.getExternalSource()->updateOutOfDateIdentifier(*II); + // If the identifier is a macro, and if that macro is enabled, it may be // expanded so it's not a trivial expansion. if (II->hasMacroDefinition() && PP.getMacroInfo(II)->isEnabled() && |

