[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)
commitc5dc3be894b5da943a897afaf80d27c688417425
treee648742dee3907fca0cfbfc70feacf9baa797585
parent7411e94aa844d5bfc8cedab8dfc70e4247bbeed9
[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

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