aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ExternalASTMerger.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-06-17Call setMustBuildLookupTable on TagDecls in ExternalASTMergerLang Hames1-0/+1
Summary: setMustBuildLookupTable should be called on imported TagDecls otherwise we may fail to import their member decls (if they have any). Not calling the setMustBuildLookupTable method results in a failure in the attached test case when lookup for the 'x' member fails on struct S, which hasn't had its decls imported elsewhere. (By contrast the member-in-struct testcase hasn't run into this issue because the import of its decls is triggered when the struct instance is defined, and the member access follows this). Reviewers: spyffe, rsmith Reviewed By: spyffe, rsmith Differential Revision: https://reviews.llvm.org/D34253 llvm-svn: 305619
2017-05-13[ASTImporter] Improve handling of incomplete typesSean Callanan1-0/+6
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. llvm-svn: 302975
2017-04-17Use default ref capture to simplify local lambdas, use a template to avoid ↵David Blaikie1-22/+17
std::function overhead, other cleanup llvm-svn: 300461
2017-04-13ExternalASTMerger.cpp: Silence another warning. [-Wunused-lambda-capture]NAKAMURA Takumi1-0/+1
llvm-svn: 300145
2017-04-11Silence unused variable warning in release builds.Benjamin Kramer1-0/+1
llvm-svn: 300006
2017-04-11[ExternalASTMerger] Removed a move constructor to address MSVC build failureSean Callanan1-1/+1
llvm-svn: 299983
2017-04-11[ExternalASTMerger] Fix the MSVC buildSean Callanan1-3/+3
llvm-svn: 299977
2017-04-11[clang-import-test] Lookup inside contextsSean Callanan1-0/+183
clang-import-test has until now been only able to report top-level Decls. This is clearly insufficient; we should be able to look inside structs and namespaces also. This patch adds new test cases for a variety of lookups inside existing ASTContexts, and adds the functionality necessar to make most of these testcases work. (One testcase is known to fail because of ASTImporter limitations when importing templates; I'll look into that separately.) This patch also separates the core functionality out into ExternalASTMerger, an interface that allows clients like LLDB to make use of it. clang-import-test now only has the machinery necessary to set up the tests. Differential revision: https://reviews.llvm.org/D30435 llvm-svn: 299976