]> granicus.if.org Git - clang/commit
Implement "incremental" template instantiation for non-type template
authorDouglas Gregor <dgregor@apple.com>
Sat, 31 Oct 2009 17:21:17 +0000 (17:21 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sat, 31 Oct 2009 17:21:17 +0000 (17:21 +0000)
commit550d9b28fd586db541eb6dd36f3c10d114e483d8
treeb01023c9c5330b297f5388de6ac1a22dadc028b1
parentdf7c3b955e31a6951822f2adf36e98543ef14c7e
Implement "incremental" template instantiation for non-type template
parameters and template type parameters, which occurs when
substituting into the declarations of member templates inside class
templates. This eliminates errors about our inability to "reduce
non-type template parameter depth", fixing PR5311.

Also fixes a bug when instantiating a template type parameter
declaration in a member template, where we weren't properly reducing
the template parameter's depth.

LLVM's StringSwitch header now parses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85669 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/Sema.h
lib/Sema/SemaTemplateInstantiate.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
test/SemaTemplate/instantiate-non-type-template-parameter.cpp [new file with mode: 0644]
test/SemaTemplate/member-template-access-expr.cpp