This is an archive of the discontinued LLVM Phabricator instance.

[clang][lex] NFC: Simplify calls to `LookupFile`
ClosedPublic

Authored by jansvoboda11 on Jan 14 2022, 6:56 AM.

Details

Summary

The {HeaderSearch,Preprocessor}::LookupFile() functions take an out-parameter const DirectoryLookup *&. Most callers end up creating a const DirectoryLookup * variable that's otherwise unused.

This patch changes the out-parameter from reference to a pointer, making it possible to simply pass nullptr to the function without the ceremony.

Diff Detail

Event Timeline

jansvoboda11 created this revision.Jan 14 2022, 6:56 AM
jansvoboda11 requested review of this revision.Jan 14 2022, 6:56 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 14 2022, 6:56 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
ahoppen accepted this revision.Jan 14 2022, 10:09 AM

LGTM.

This revision is now accepted and ready to land.Jan 14 2022, 10:09 AM
This revision was landed with ongoing or failed builds.Jan 18 2022, 7:02 AM
This revision was automatically updated to reflect the committed changes.