[PATCH] D74542: [ASTImporter] Prevent the ASTImporter from creating multiple main FileIDs.
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 13 06:35:50 PST 2020
martong added a comment.
In D74542#1874221 <https://reviews.llvm.org/D74542#1874221>, @teemperor wrote:
> In D74542#1874201 <https://reviews.llvm.org/D74542#1874201>, @martong wrote:
>
> > Looks good to me! Thanks!
> > Adding @balazske as another reviewer though. He worked on something related to this, where we also experienced an assert in `isBeforeInTranslationUnit`.
>
>
> IIRC the analyser is using the isBeforeInTranslationUnit for the error paths so that's how the X-TU analysis could hit this situation (if the error path is spanning Decls from different files). But that's mostly speculation.
Yes exactly, but we actually use the SourceLocation from the "From" unit, we have a mapping in `CrossTranslationUnitContext` for that purpose. See `CrossTranslationUnitContext::getImportedFromSourceLocation` (and https://reviews.llvm.org/D64554 and https://reviews.llvm.org/D64638)
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74542/new/
https://reviews.llvm.org/D74542
More information about the cfe-commits
mailing list