Simplify identifier lookup in raw mode, implementing Preprocessor/macro_fn_lparen_scan2.c.
llvm-svn: 38744
diff --git a/clang/Lex/Lexer.cpp b/clang/Lex/Lexer.cpp
index a9905f3..81ccbca 100644
--- a/clang/Lex/Lexer.cpp
+++ b/clang/Lex/Lexer.cpp
@@ -359,6 +359,10 @@
FormTokenWithChars(Result, CurPtr);
Result.SetKind(tok::identifier);
+ // If we are in raw mode, return this identifier raw. There is no need to
+ // look up identifier information or attempt to macro expand it.
+ if (LexingRawMode) return;
+
// Fill in Result.IdentifierInfo, looking up the identifier in the
// identifier table.
PP.LookUpIdentifierInfo(Result, IdStart);