llvm-project/clang/test/ASTMerge
Gabor Marton 303c9861e9 [ASTImporter] Store import errors for Decls
Summary:
We add a new member which is a mapping from the already-imported
declarations in the "from" context to the error status of the import of
that declaration.  This map contains only the declarations that were not
correctly imported. The same declaration may or may not be included in
ImportedDecls. This map is updated continuously during imports and never
cleared (like ImportedDecls).  In Import(Decl*) we use this mapping, so
if there was a previous failed import we return with the existing error.

We add/remove from the Lookuptable in consistency with ImportedFromDecls.
When we map a decl in the 'to' context to something in the 'from'
context then and only then we add it to the lookup table. When we
remove a mapping then and only then we remove it from the lookup table.

This patch is the first in a series of patches whose aim is to further
strengthen the error handling in ASTImporter.

Reviewers: a_sidorin, a.sidorin, shafik

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

Tags: #clang

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

llvm-svn: 364279
2019-06-25 08:00:51 +00:00
..
anonymous-fields Restore test files accidentally deleted in r354839 2019-05-14 18:51:07 +00:00
asm Restore test files accidentally deleted in r354839 2019-05-14 18:51:07 +00:00
category Update ASTMerge FileCheck test expectations 2019-05-14 19:02:39 +00:00
choose-expr [ASTImporter] Add support for importing ChooseExpr AST nodes. 2019-02-26 19:26:41 +00:00
class Restore test files accidentally deleted in r354839 2019-05-14 18:51:07 +00:00
class-template Update ASTMerge FileCheck test expectations 2019-05-14 19:02:39 +00:00
class-template-partial-spec [ASTImporter] Store import errors for Decls 2019-06-25 08:00:51 +00:00
class2 Restore test files accidentally deleted in r354839 2019-05-14 18:51:07 +00:00
codegen-body Restore test files accidentally deleted in r354839 2019-05-14 18:51:07 +00:00
codegen-exprs Restore test files accidentally deleted in r354839 2019-05-14 18:51:07 +00:00
enum Update ASTMerge FileCheck test expectations 2019-05-14 19:02:39 +00:00
exprs Restore test files accidentally deleted in r354839 2019-05-14 18:51:07 +00:00
exprs-cpp Restore test files accidentally deleted in r354839 2019-05-14 18:51:07 +00:00
function Update ASTMerge FileCheck test expectations 2019-05-14 19:02:39 +00:00
function-cpp Restore test files accidentally deleted in r354839 2019-05-14 18:51:07 +00:00
inheritance Restore test files accidentally deleted in r354839 2019-05-14 18:51:07 +00:00
init-ctors Restore test files accidentally deleted in r354839 2019-05-14 18:51:07 +00:00
injected-class-name-decl Restore test files accidentally deleted in r354839 2019-05-14 18:51:07 +00:00
interface Update ASTMerge FileCheck test expectations 2019-05-14 19:02:39 +00:00
macro Restore test files accidentally deleted in r354839 2019-05-14 18:51:07 +00:00
namespace Fix ASTMerge/namespace/test.cpp after r360701 2019-05-14 20:01:03 +00:00
property Update ASTMerge FileCheck test expectations 2019-05-14 19:02:39 +00:00
std-initializer-list Restore test files accidentally deleted in r354839 2019-05-14 18:51:07 +00:00
struct Update ASTMerge FileCheck test expectations 2019-05-14 19:02:39 +00:00
typedef Update ASTMerge FileCheck test expectations 2019-05-14 19:02:39 +00:00
unnamed_fields Restore test files accidentally deleted in r354839 2019-05-14 18:51:07 +00:00
var Update ASTMerge FileCheck test expectations 2019-05-14 19:02:39 +00:00
var-cpp Restore test files accidentally deleted in r354839 2019-05-14 18:51:07 +00:00