summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaInit.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index a678a31a5ac..958dd66612c 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -9155,8 +9155,11 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer(
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) {
OpenPOWER on IntegriCloud