[PATCH] D127379: [Lex] Keep track of skipped preprocessor blocks and advance the lexer directly if they are revisited

Ben Langmuir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 13 14:09:36 PDT 2022


benlangmuir accepted this revision.
benlangmuir added a comment.
This revision is now accepted and ready to land.

Couple more minor things, but basically LGTM.



================
Comment at: clang/include/clang/Lex/Preprocessor.h:2601
+  /// This is used to guard against calling this function recursively.
+  bool SkippingExcludedConditionalBlock = false;
+
----------------
Would be good to mention *why* this is unsafe so we don't remove it by accident (or so we *can* remove it later if we ever change the code so it doesn't matter anymore).

Oh, and style nit: we should move these new fields to the top of the class where all the other fields are.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127379/new/

https://reviews.llvm.org/D127379



More information about the cfe-commits mailing list