[PATCH] D147928: [clang] Keep multiple-include optimization for null directives
Elliot Goodrich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 18 12:29:58 PDT 2023
IncludeGuardian added inline comments.
================
Comment at: clang/lib/Lex/PPDirectives.cpp:1183-1185
+ if (!ReadAnyTokensBeforeDirective) {
+ CurPPLexer->MIOpt.ResetReadToken();
+ }
----------------
aaron.ballman wrote:
> NFC but matches our style guide.
>
> One thing to consider: making the call a setter instead of a reset would simplify this logic into: `CurPPLexer->SetReadToken(ReadAnyTokensBeforeDirective);` without any branching required. WDYT?
Sounds good. Removing the condition here should look neater.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147928/new/
https://reviews.llvm.org/D147928
More information about the cfe-commits
mailing list