summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-12-20 22:05:00 +0000
committerDouglas Gregor <dgregor@apple.com>2010-12-20 22:05:00 +0000
commit840bd6cce5ace4f42d58ec88f1aabd99138271f5 (patch)
treed96f53ed9f1fe15006e88095bc5cfd2c3b7c4d90 /clang/lib/Sema/Sema.cpp
parent4b9db07b02b36808ed97975a711c30cc49a8ccb7 (diff)
downloadbcm5719-llvm-840bd6cce5ace4f42d58ec88f1aabd99138271f5.tar.gz
bcm5719-llvm-840bd6cce5ace4f42d58ec88f1aabd99138271f5.zip
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. llvm-svn: 122278
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r--clang/lib/Sema/Sema.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index fcc5370ed9e..ca69d69959c 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -140,7 +140,8 @@ Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer,
GlobalNewDeleteDeclared(false),
CompleteTranslationUnit(CompleteTranslationUnit),
NumSFINAEErrors(0), SuppressAccessChecking(false),
- NonInstantiationEntries(0), CurrentInstantiationScope(0), TyposCorrected(0),
+ NonInstantiationEntries(0), ArgumentPackSubstitutionIndex(-1),
+ CurrentInstantiationScope(0), TyposCorrected(0),
AnalysisWarnings(*this)
{
TUScope = 0;
OpenPOWER on IntegriCloud