Implement basic support for template instantiation of pack expansions
whose patterns are template arguments. We can now instantiate, e.g., typedef tuple<pair<OuterTypes, InnerTypes>...> type; where OuterTypes and InnerTypes are template type parameter packs. There is a horrible inefficiency in TemplateArgumentLoc::getPackExpansionPattern(), where we need to create copies of TypeLoc data because our interfaces traffic in TypeSourceInfo pointers where they should traffic in TypeLocs instead. I've isolated in efficiency in this one routine; once we refactor our interfaces to traffic in TypeLocs, we can eliminate it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122278 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/AST/TemplateBase.h 10 additions, 0 deletionsinclude/clang/AST/TemplateBase.h
- include/clang/Basic/DiagnosticSemaKinds.td 6 additions, 0 deletionsinclude/clang/Basic/DiagnosticSemaKinds.td
- include/clang/Sema/Sema.h 47 additions, 0 deletionsinclude/clang/Sema/Sema.h
- include/clang/Sema/Template.h 6 additions, 3 deletionsinclude/clang/Sema/Template.h
- lib/AST/TemplateBase.cpp 64 additions, 0 deletionslib/AST/TemplateBase.cpp
- lib/Sema/Sema.cpp 2 additions, 1 deletionlib/Sema/Sema.cpp
- lib/Sema/SemaTemplate.cpp 0 additions, 2 deletionslib/Sema/SemaTemplate.cpp
- lib/Sema/SemaTemplateInstantiate.cpp 102 additions, 5 deletionslib/Sema/SemaTemplateInstantiate.cpp
- lib/Sema/SemaTemplateVariadic.cpp 25 additions, 14 deletionslib/Sema/SemaTemplateVariadic.cpp
- lib/Sema/TreeTransform.h 161 additions, 12 deletionslib/Sema/TreeTransform.h
- test/CXX/temp/temp.decls/temp.variadic/p4.cpp 15 additions, 0 deletionstest/CXX/temp/temp.decls/temp.variadic/p4.cpp
- test/CXX/temp/temp.decls/temp.variadic/p5.cpp 19 additions, 0 deletionstest/CXX/temp/temp.decls/temp.variadic/p5.cpp
Loading
Please register or sign in to comment