[PATCH] D125487: [Tooling/DependencyScanning] Refactor dependency scanning to produce pre-lexed preprocessor directive tokens, instead of minimized sources

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 23 05:16:58 PDT 2022


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

LGTM, nice cleanup! Left a couple of nits.



================
Comment at: clang/lib/Lex/DependencyDirectivesScanner.cpp:153
+
+  SmallVector<dependency_directives_scan::Token, 32> CurDirToks;
+  SmallVector<DirectiveWithTokens, 64> DirsWithToks;
----------------
Can you add a comment explaining the relationship between the members?


================
Comment at: clang/unittests/Lex/DependencyDirectivesScannerTest.cpp:114
+  EXPECT_EQ(cxx_export_module_decl, Directives[19].Kind);
+  EXPECT_EQ(cxx_import_decl, Directives[20].Kind);
+  EXPECT_EQ(pp_eof, Directives[21].Kind);
----------------
What's the reason being these changes?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125487



More information about the cfe-commits mailing list