summaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r--clang/lib/Sema/SemaInit.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index 370e7ca1d918..78092638a543 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -10262,12 +10262,13 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer(
MarkFunctionReferenced(Kind.getLocation(), Best->Function);
break;
}
+ QualType RT = Best->Function->getReturnType();
+ // FIXME: resugar here
// C++ [dcl.type.class.deduct]p1:
// The placeholder is replaced by the return type of the function selected
// by overload resolution for class template deduction.
- QualType DeducedType =
- SubstAutoType(TSInfo->getType(), Best->Function->getReturnType());
+ QualType DeducedType = SubstAutoType(TSInfo->getType(), RT);
Diag(TSInfo->getTypeLoc().getBeginLoc(),
diag::warn_cxx14_compat_class_template_argument_deduction)
<< TSInfo->getTypeLoc().getSourceRange() << 1 << DeducedType;