Use a separate diagnostic for default function argument expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81062 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 58d6a0d..7d2e308 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -2573,12 +2573,9 @@
// Instantiate the expression.
MultiLevelTemplateArgumentList ArgList = getTemplateInstantiationArgs(FD);
-
- // FIXME: We should really make a new InstantiatingTemplate ctor
- // that has a better message - right now we're just piggy-backing
- // off the "default template argument" error message.
- InstantiatingTemplate Inst(*this, CallLoc, FD->getPrimaryTemplate(),
- ArgList.getInnermost().getFlatArgumentList(),
+
+ InstantiatingTemplate Inst(*this, CallLoc, Param,
+ ArgList.getInnermost().getFlatArgumentList(),
ArgList.getInnermost().flat_size());
OwningExprResult Result = SubstExpr(UninstExpr, ArgList);