[PATCH] D88780: Allow interfaces to operate on in-memory buffers with no source location info.

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 8 12:43:22 PDT 2020


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



More information about the cfe-commits mailing list