This is an archive of the discontinued LLVM Phabricator instance.

[Lex] Make sure to notify `MultipleIncludeOpt` for "read tokens" during fast dependency directive lexing
ClosedPublic

Authored by akyrtzi on Jun 28 2022, 4:59 PM.

Details

Summary

Otherwise a header may be erroneously marked as having a header macro guard and won't get re-included.

Diff Detail

Event Timeline

akyrtzi created this revision.Jun 28 2022, 4:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 28 2022, 4:59 PM
akyrtzi requested review of this revision.Jun 28 2022, 4:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 28 2022, 4:59 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
benlangmuir added inline comments.Jun 29 2022, 3:05 PM
clang/lib/Lex/Lexer.cpp
4251

Why do we need the >1 check? I'm not familiar with the details of MIO here.

akyrtzi added inline comments.Jun 29 2022, 3:29 PM
clang/lib/Lex/Lexer.cpp
4251

I'm making sure that MIOpt.ReadToken() is called for every token except the starting hash of a preprocessor directive, to match what regular lexing is doing.

benlangmuir accepted this revision.Jun 29 2022, 3:41 PM
This revision is now accepted and ready to land.Jun 29 2022, 3:41 PM
This revision was landed with ongoing or failed builds.Jun 29 2022, 3:51 PM
This revision was automatically updated to reflect the committed changes.