[PATCH] D64638: [CrossTU] Fix plist macro expansion if macro in other file.

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 24 05:30:50 PDT 2019


balazske added a comment.

The Frontend is needed because "ASTUnit.h" is added now into PlistDiagnostics.cpp. The `ASTUnit` object is used to pass information out from `getImportedFromSourceLocation`. The StaticAnalyzerCore library uses CrossTU library, and CrossTU uses Frontend, so I think it may be not a problem if StaticAnalyzerCore will use directly Frontend. Otherwise the `getImportedFromSourceLocation` can return the `Preprocessor` (and `ASTContext`) (in a tuple) instead of an `ASTUnit` and use of `ASTUnit` is not needed. (Patch in D65064 <https://reviews.llvm.org/D65064> contains a test that does work only if the TranslationUnitDecl of the imported-from AST is known, to get this value an `ASTUnit` or `ASTContext` must be returned from `getImportedFromSourceLocation`.)


Repository:
  rC Clang

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

https://reviews.llvm.org/D64638





More information about the cfe-commits mailing list