[PATCH] D93224: [RFC][analyzer] Use the MacroExpansionContext for macro expansions in plists

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 16 03:45:56 PST 2020


steakhal added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp:826-833
+static MacroExpansionContext::MacroExpansionText
+getExpandedMacro(SourceLocation MacroExpansionLoc,
+                 const cross_tu::CrossTranslationUnitContext &CTU,
+                 const MacroExpansionContext &MacroExpansions,
+                 const SourceManager &SM) {
+  if (auto LocAndUnit = CTU.getImportedFromSourceLocation(MacroExpansionLoc)) {
+    // TODO: Implement macro expansions for CTU.
----------------
I don't like that I will ruin the CTU expansions - even temporarily.
I will probably commit this patch together with the 4th one, where I will use the same macro expansion mechanism for CTU too.
So these two patches are for 'logical' separation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93224



More information about the cfe-commits mailing list