[PATCH] D93223: [RFC][analyzer] Create MacroExpansionContext member in AnalysisConsumer and pass down to the diagnostics consumers

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 15 05:21:12 PST 2020


xazax.hun added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:129
+        Plugins(plugins), Injector(injector), CTU(CI),
+        MacroExpansions(PP, CI.getLangOpts()) {
     DigestAnalyzerOptions();
----------------
This will always record macro related information right? Some of the diagnostic consumers might not ever touch macro expansions. I think it would be great to only record expansions when we actually will end up using them.  Alternatively, a benchmark proving the runtime of recording negligible on macro heavy code (boost maybe?) might be sufficient.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93223



More information about the cfe-commits mailing list