aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 58d6a0dbac..7d2e308349 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -2573,12 +2573,9 @@ Sema::OwningExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc,
// 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);