diff options
-rw-r--r-- | lib/Sema/SemaTemplateInstantiateDecl.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index fc51684f9e..b7548415aa 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -711,7 +711,9 @@ ParmVarDecl *TemplateDeclInstantiator::VisitParmVarDecl(ParmVarDecl *D) { // Mark the default argument as being uninstantiated. if (D->hasUninstantiatedDefaultArg()) Param->setUninstantiatedDefaultArg(D->getUninstantiatedDefaultArg()); - + else if (Expr *Arg = D->getDefaultArg()) + Param->setUninstantiatedDefaultArg(Arg); + // Note: we don't try to instantiate function parameters until after // we've instantiated the function's type. Therefore, we don't have // to check for 'void' parameter types here. |