This is an archive of the discontinued LLVM Phabricator instance.

[clang][lex] NFC: De-duplicate some #include_next logic
ClosedPublic

Authored by jansvoboda11 on Feb 14 2022, 6:57 AM.

Details

Summary

This patch addresses a FIXME and de-duplicates some #include_next logic

Depends on D119714.

Diff Detail

Event Timeline

jansvoboda11 requested review of this revision.Feb 14 2022, 6:57 AM
jansvoboda11 created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2022, 6:57 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
ahoppen added inline comments.Feb 14 2022, 9:07 AM
clang/include/clang/Lex/Preprocessor.h
2207

I there a reason why this uses an out parameter instead of a returning a std::pair or something similar? If yes, I think it would be good to document which parameters are out parameters. IncludeNextTok looks suspiciously like an out-parameter as well but is not AFAICT.

jansvoboda11 added inline comments.Feb 15 2022, 12:47 AM
clang/include/clang/Lex/Preprocessor.h
2207

Not really. Switched to using std::pair and std::tie in the latest revision.

ahoppen accepted this revision.Feb 15 2022, 12:50 AM
This revision is now accepted and ready to land.Feb 15 2022, 12:50 AM