]> granicus.if.org Git - clang/commitdiff
When creating the raw tokens for PTHLexer, make sure the token representing the file...
authorTed Kremenek <kremenek@apple.com>
Fri, 21 Nov 2008 20:51:15 +0000 (20:51 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 21 Nov 2008 20:51:15 +0000 (20:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59842 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/PPLexerChange.cpp

index da877493a0f2a2fde89f49d99ae15ea3fbde5c0b..e755edb55e0c8313004df97fe546efecb32ea354 100644 (file)
@@ -74,7 +74,7 @@ void Preprocessor::EnterSourceFile(unsigned FileID,
   if (MaxIncludeStackDepth < IncludeMacroStack.size())
     MaxIncludeStackDepth = IncludeMacroStack.size();
 
-#if 1
+#if 0
   Lexer *TheLexer = new Lexer(SourceLocation::getFileLoc(FileID, 0), *this);
   EnterSourceFileWithLexer(TheLexer, CurDir);
 #else
@@ -122,6 +122,9 @@ void Preprocessor::EnterSourceFile(unsigned FileID,
         L.ParsingPreprocessorDirective = true;
         L.LexIncludeFilename(Tok); 
         L.ParsingPreprocessorDirective = false;
+        
+        if (Tok.is(tok::identifier))
+          Tok.setIdentifierInfo(LookUpIdentifierInfo(Tok));
       }
     }    
   }