[clang-import-test] Lookup inside contexts
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299976 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/AST/ExternalASTMerger.h 51 additions, 0 deletionsinclude/clang/AST/ExternalASTMerger.h
- lib/AST/CMakeLists.txt 1 addition, 0 deletionslib/AST/CMakeLists.txt
- lib/AST/ExternalASTMerger.cpp 183 additions, 0 deletionslib/AST/ExternalASTMerger.cpp
- test/Import/forward-declared-struct/Inputs/S1.c 1 addition, 0 deletionstest/Import/forward-declared-struct/Inputs/S1.c
- test/Import/forward-declared-struct/Inputs/S2.c 3 additions, 0 deletionstest/Import/forward-declared-struct/Inputs/S2.c
- test/Import/forward-declared-struct/test.c 5 additions, 0 deletionstest/Import/forward-declared-struct/test.c
- test/Import/member-in-struct/Inputs/S.c 3 additions, 0 deletionstest/Import/member-in-struct/Inputs/S.c
- test/Import/member-in-struct/test.c 5 additions, 0 deletionstest/Import/member-in-struct/test.c
- test/Import/multiple-forward-declarations/Inputs/S1.c 1 addition, 0 deletionstest/Import/multiple-forward-declarations/Inputs/S1.c
- test/Import/multiple-forward-declarations/Inputs/S2.c 1 addition, 0 deletionstest/Import/multiple-forward-declarations/Inputs/S2.c
- test/Import/multiple-forward-declarations/test.c 4 additions, 0 deletionstest/Import/multiple-forward-declarations/test.c
- test/Import/overloaded-function/Inputs/F1.c 1 addition, 0 deletionstest/Import/overloaded-function/Inputs/F1.c
- test/Import/overloaded-function/Inputs/F2.c 4 additions, 0 deletionstest/Import/overloaded-function/Inputs/F2.c
- test/Import/overloaded-function/test.c 7 additions, 0 deletionstest/Import/overloaded-function/test.c
- test/Import/struct-in-namespace/Inputs/N1.cpp 11 additions, 0 deletionstest/Import/struct-in-namespace/Inputs/N1.cpp
- test/Import/struct-in-namespace/Inputs/N2.cpp 5 additions, 0 deletionstest/Import/struct-in-namespace/Inputs/N2.cpp
- test/Import/struct-in-namespace/Inputs/N3.cpp 5 additions, 0 deletionstest/Import/struct-in-namespace/Inputs/N3.cpp
- test/Import/struct-in-namespace/test.cpp 7 additions, 0 deletionstest/Import/struct-in-namespace/test.cpp
- test/Import/template-specialization/Inputs/T.cpp 14 additions, 0 deletionstest/Import/template-specialization/Inputs/T.cpp
- test/Import/template-specialization/test.cpp 7 additions, 0 deletionstest/Import/template-specialization/test.cpp
Loading
Please register or sign in to comment