[clang] [analyzer][CTU] Macro expansions for imported translation units (PR #176126)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 6 05:15:42 PST 2026
================
@@ -227,7 +229,25 @@ class CrossTranslationUnitContext {
ASTContext &Context;
std::shared_ptr<ASTImporterSharedState> ImporterSharedSt;
- using LoadResultTy = llvm::Expected<std::unique_ptr<ASTUnit>>;
+ /// Map of imported FileID's (in "To" context) to FileID in "From" context
+ /// and the ASTUnit for the From context.
+ /// This map is used by getMacroExpansionContextForSourceLocation to lookup a
+ /// FileID and its Preprocessor when knowing only the FileID in the 'To'
+ /// context. The FileID could be imported by any of multiple 'From'
+ /// ASTImporter objects. we do not want to loop over all ASTImporter's to find
----------------
NagyDonat wrote:
```suggestion
/// ASTImporter objects. We do not want to loop over all ASTImporter's to find
```
Just a typo.
https://github.com/llvm/llvm-project/pull/176126
More information about the cfe-commits
mailing list