v.g.vassilev added a comment. @shafik, I suppose that with a good amount of effort we may be able to test it in a unittest setup.
In my point of view, this patch is rather fixing an interface inconsistency which was discovered in the context of cling. The ASTImporter already makes a promise to handle invalid source locations here: https://github.com/llvm-project/clang/blob/master/lib/AST/ASTImporter.cpp#L8388-L8392 However, if the presumed location is invalid we call an isWrittenInBuiltinFile and fail. I think isWrittenInBuiltinFile should not assert if called with an invalid source location or presumed source location -- the answer should be false. Alternatively, we can extend the ASTImporter to support also invalid presumed locations. The design document will likely not contain such details ;) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88780/new/ https://reviews.llvm.org/D88780 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits