summaryrefslogtreecommitdiffstats
path: root/include/clang/AST
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2017-05-13 00:46:33 +0000
committerSean Callanan <scallanan@apple.com>2017-05-13 00:46:33 +0000
commit848b631d3a1e857e2ad2fe61f09ad6de50e89c25 (patch)
treea028b8cccb5b573b0fe77c7e7b27bc72387e8d29 /include/clang/AST
parentab2094bec03b5d0c32f484bd3730e1f47846e3e8 (diff)
[ASTImporter] Improve handling of incomplete types
ASTImporter has some bugs when it's importing types that themselves come from an ExternalASTSource. This is exposed particularly in the behavior when comparing complete TagDecls with forward declarations. This patch does several things: - Adds a test case making sure that conflicting forward-declarations are resolved correctly; - Extends the clang-import-test harness to test two-level importing, so that we make sure we complete types when necessary; and - Fixes a few bugs I found this way. Failure to complete types was one; however, I also discovered that complete RecordDecls aren't properly added to the redecls chain for existing forward declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302975 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST')
-rw-r--r--include/clang/AST/ExternalASTMerger.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/clang/AST/ExternalASTMerger.h b/include/clang/AST/ExternalASTMerger.h
index 51d0c30ad2..55459df1fe 100644
--- a/include/clang/AST/ExternalASTMerger.h
+++ b/include/clang/AST/ExternalASTMerger.h
@@ -44,6 +44,8 @@ public:
FindExternalLexicalDecls(const DeclContext *DC,
llvm::function_ref<bool(Decl::Kind)> IsKindWeWant,
SmallVectorImpl<Decl *> &Result) override;
+
+ void CompleteType(TagDecl *Tag) override;
};
} // end namespace clang