Page MenuHomePhabricator

Fix PCH skipping to handle all Lexers

Authored by mikerice on Apr 26 2019, 5:04 PM.



When skipping code at the start of a file during PCH use, Preprocessor::Lex is not used since it consumes all preprocessor directives until it returns a real token. Using the specific Lexer (i.e. CurLexer->Lex) makes it possible to stop skipping after an #include or #pragma hdrstop. Previously the skipping code was only handling CurLexer, now all will be handled correctly.


Diff Detail

rC Clang

Event Timeline

mikerice created this revision.Apr 26 2019, 5:04 PM
rnk accepted this revision.Apr 29 2019, 1:49 PM

lgtm, thanks!

This revision is now accepted and ready to land.Apr 29 2019, 1:49 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 29 2019, 2:21 PM