No need to call setIdentifierInfo() after LookUpIdentifierInfo() which LookUpIdentifierInfo() will automatically do
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98435 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Lex/TokenLexer.cpp b/lib/Lex/TokenLexer.cpp
index 5d95eb3..aae7352 100644
--- a/lib/Lex/TokenLexer.cpp
+++ b/lib/Lex/TokenLexer.cpp
@@ -325,7 +325,7 @@
// returned by PasteTokens, not the pasted token.
if (PasteTokens(Tok))
return;
-
+
TokenIsFromPaste = true;
}
@@ -506,8 +506,7 @@
if (Tok.is(tok::identifier)) {
// Look up the identifier info for the token. We disabled identifier lookup
// by saying we're skipping contents, so we need to do this manually.
- IdentifierInfo *II = PP.LookUpIdentifierInfo(Tok, ResultTokStrPtr);
- Tok.setIdentifierInfo(II);
+ PP.LookUpIdentifierInfo(Tok, ResultTokStrPtr);
}
return false;
}