forked from OSchip/llvm-project
Preserve the template type parameter name when instantiating a templace.
Fixes PR8489. llvm-svn: 117776
This commit is contained in:
parent
5c0b40528d
commit
b9b3927356
|
@ -1508,7 +1508,7 @@ Decl *TemplateDeclInstantiator::VisitTemplateTypeParmDecl(
|
|||
TemplateTypeParmDecl *Inst =
|
||||
TemplateTypeParmDecl::Create(SemaRef.Context, Owner, D->getLocation(),
|
||||
TTPT->getDepth() - TemplateArgs.getNumLevels(),
|
||||
TTPT->getIndex(),TTPT->getName(),
|
||||
TTPT->getIndex(), D->getIdentifier(),
|
||||
D->wasDeclaredWithTypename(),
|
||||
D->isParameterPack());
|
||||
|
||||
|
|
|
@ -203,3 +203,15 @@ namespace PR7669 {
|
|||
X<int>::Y<int>::Z<0,int>();
|
||||
}
|
||||
}
|
||||
|
||||
namespace PR8489 {
|
||||
template <typename CT>
|
||||
class C {
|
||||
template<typename FT>
|
||||
void F() {} // expected-note{{FT}}
|
||||
};
|
||||
void f() {
|
||||
C<int> c;
|
||||
c.F(); // expected-error{{no matching member function}}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue