diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-03-18 07:53:20 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-03-18 07:53:20 +0000 |
commit | d8dee1f54bfa6cc71806e2f960cd7a1fe4768a75 (patch) | |
tree | b98ff481e74d50e22fe851ce2b597b5fdb5895e3 /clang/lib/Lex/PPMacroExpansion.cpp | |
parent | aaf2b84f99bdf5532dc4f0d1121fe96518c904ea (diff) | |
download | bcm5719-llvm-d8dee1f54bfa6cc71806e2f960cd7a1fe4768a75.tar.gz bcm5719-llvm-d8dee1f54bfa6cc71806e2f960cd7a1fe4768a75.zip |
Lex: Don't call getIdentifierInfo on annotation tokens
These calls are usually guarded by checks for isAnnotation() but it
looks like we missed a spot. This would cause the included test to
crash clang.
llvm-svn: 232616
Diffstat (limited to 'clang/lib/Lex/PPMacroExpansion.cpp')
-rw-r--r-- | clang/lib/Lex/PPMacroExpansion.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index d45143945f9..2994176dcb2 100644 --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/lib/Lex/PPMacroExpansion.cpp @@ -598,7 +598,7 @@ MacroArgs *Preprocessor::ReadFunctionLikeMacroArgs(Token &MacroName, // If this is a comment token in the argument list and we're just in // -C mode (not -CC mode), discard the comment. continue; - } else if (Tok.getIdentifierInfo() != nullptr) { + } else if (!Tok.isAnnotation() && Tok.getIdentifierInfo() != nullptr) { // Reading macro arguments can cause macros that we are currently // expanding from to be popped off the expansion stack. Doing so causes // them to be reenabled for expansion. Here we record whether any |