]> granicus.if.org Git - clang/commit
[CrossTU] Add a function to retrieve original source location.
authorBalazs Keri <1.int32@gmail.com>
Wed, 24 Jul 2019 10:16:37 +0000 (10:16 +0000)
committerBalazs Keri <1.int32@gmail.com>
Wed, 24 Jul 2019 10:16:37 +0000 (10:16 +0000)
commitb1b906219fe4fed470794987a612611112947382
treec26fee629fc79dc5ca96606f4b11be9ded312805
parent8edfd52e3c7191e77fd5751c8ae10416917b6c93
[CrossTU] Add a function to retrieve original source location.

Summary:
A new function will be added to get the original SourceLocation
for a SourceLocation that was imported as result of getCrossTUDefinition.
The returned SourceLocation is in the context of the (original)
SourceManager for the original source file. Additionally the
ASTUnit object for that source file is returned. This is needed
to get a SourceManager to operate on with the returned source location.

The new function works if multiple different source files are loaded
with the same CrossTU context.

Reviewers: martong, shafik

Reviewed By: martong

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D65064

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366884 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/ASTImporter.h
include/clang/CrossTU/CrossTranslationUnit.h
lib/AST/ASTImporter.cpp
lib/CrossTU/CrossTranslationUnit.cpp
unittests/CrossTU/CrossTranslationUnitTest.cpp