[PATCH] D128772: [Lex] Make sure to notify `MultipleIncludeOpt` for "read tokens" during fast dependency directive lexing

Argyrios Kyrtzidis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 29 15:29:19 PDT 2022


akyrtzi added inline comments.


================
Comment at: clang/lib/Lex/Lexer.cpp:4251
       DepDirectives.front().Tokens[NextDepDirectiveTokenIndex++];
+  if (NextDepDirectiveTokenIndex > 1 || DDTok.Kind != tok::hash) {
+    // Read something other than a preprocessor directive hash.
----------------
benlangmuir wrote:
> Why do we need the >1 check? I'm not familiar with the details of MIO here.
I'm making sure that `MIOpt.ReadToken()` is called for every token except the starting hash of a preprocessor directive, to match what regular lexing is doing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128772



More information about the cfe-commits mailing list