[PATCH] D147928: [clang] Keep multiple-include optimization for null directives

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 17 09:33:57 PDT 2023


aaron.ballman added inline comments.


================
Comment at: clang/lib/Lex/PPDirectives.cpp:1183-1185
+    if (!ReadAnyTokensBeforeDirective) {
+      CurPPLexer->MIOpt.ResetReadToken();
+    }
----------------
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?


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