]> granicus.if.org Git - clang/commit
[ASTImporter] Added error handling for AST import.
authorBalazs Keri <1.int32@gmail.com>
Fri, 19 Oct 2018 13:32:20 +0000 (13:32 +0000)
committerBalazs Keri <1.int32@gmail.com>
Fri, 19 Oct 2018 13:32:20 +0000 (13:32 +0000)
commit6ff4ea1ff66d17d41fc5f5eab27128a6a14034aa
treea4dc1720dc595bd96624774b4cc55d5ce0942633
parent7dcc1a53bdd48e8c398432d5cf17675740ee107d
[ASTImporter] Added error handling for AST import.

Summary:
The goal of this change is to make the ASTImporter::Import functions return
llvm::Expected instead of the imported type.
As first part the ASTNodeImporter visit functions are updated to return with
llvm::Expected. Various `import` functions are added to ASTNodeImporter to
simplify the code and have a common place for interface towards ASTImporter
(from ASTNodeImporter). There is some temporary code that is needed before
ASTImporter is updated.

Reviewers: a.sidorin, a_sidorin, xazax.hun

Reviewed By: a_sidorin

Subscribers: dkrupp, Szelethus, rnkovacs, martong, jfb, cfe-commits

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

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