[ASTImporter] Propagate error from ImportDeclContext
authorGabor Marton <gabor.marton@ericsson.com>
Mon, 1 Jul 2019 12:44:39 +0000 (12:44 +0000)
committerGabor Marton <gabor.marton@ericsson.com>
Mon, 1 Jul 2019 12:44:39 +0000 (12:44 +0000)
commit17c3eafb2e30dd507517bd072c27cbdf5ab36141
tree3072cae2095d2dffb9c4b1052e7ea32d1e6466f2
parent08c38f77c5fb4d3735ec215032fed8ee6730b3db
[ASTImporter] Propagate error from ImportDeclContext

Summary:
During analysis of one project we failed to import one
CXXDestructorDecl. But since we did not propagate the error in
importDeclContext we had a CXXRecordDecl without a destructor. Then the
analyzer engine had a CallEvent where the nonexistent dtor was requested
(crash).

Solution is to propagate the errors we have during importing a
DeclContext.

Reviewers: a_sidorin, a.sidorin, shafik

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

Tags: #clang

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

llvm-svn: 364752
clang/lib/AST/ASTImporter.cpp
clang/unittests/AST/ASTImporterTest.cpp