[PATCH] D74542: [ASTImporter] Prevent the ASTImporter from creating multiple main FileIDs.
Raphael Isemann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 17 10:48:59 PST 2020
teemperor added a comment.
In D74542#1878732 <https://reviews.llvm.org/D74542#1878732>, @balazske wrote:
> In D74542#1878576 <https://reviews.llvm.org/D74542#1878576>, @teemperor wrote:
>
> > @balazske Do you see any problems with this patch?
>
>
> I have no opinion against the change. Probably sorting order of imported source locations makes not much sense (specially if recursive imports happen) and I can not tell what is the consequence of this, maybe no problem (there was something that triggered this crash, does this way of sorting order give some usable results?).
Before this patch we would get a Clang crash in `SourceManager::isBeforeInTranslationUnit` when emitting diagnostics that cover multiple (main) files. With this patch we get a normal diagnostic. The order of the `note:` messages is in the order in which they were encountered by LLDB but that is fine as long as the order is deterministic (I also don't see a very logical order in which they should be ordered and we're fine as long as the order is deterministic).
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