deduction for new-expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343293
91177308-0d34-0410-b5e6-
96231b3b80d8
TSInfo->getType()->getContainedDeducedType());
assert(DeducedTST && "not a deduced template specialization type");
- // We can only perform deduction for class templates.
auto TemplateName = DeducedTST->getTemplateName();
+ if (TemplateName.isDependent())
+ return Context.DependentTy;
+
+ // We can only perform deduction for class templates.
auto *Template =
dyn_cast_or_null<ClassTemplateDecl>(TemplateName.getAsTemplateDecl());
if (!Template) {
template int Var(int);
template int Cast(int);
template int New(int);
+
+ template<template<typename> typename Y> void test() {
+ Y(0);
+ new Y(0);
+ Y y(0);
+ }
+ template void test<X>();
}
namespace injected_class_name {