forked from OSchip/llvm-project
Be careful about copying uninstantiated default arguments during template instantiation
llvm-svn: 82760
This commit is contained in:
parent
233117b7f6
commit
c103ccd855
|
@ -709,8 +709,8 @@ ParmVarDecl *TemplateDeclInstantiator::VisitParmVarDecl(ParmVarDecl *D) {
|
|||
D->getStorageClass(), 0);
|
||||
|
||||
// Mark the default argument as being uninstantiated.
|
||||
if (Expr *Arg = D->getDefaultArg())
|
||||
Param->setUninstantiatedDefaultArg(Arg);
|
||||
if (D->hasUninstantiatedDefaultArg())
|
||||
Param->setUninstantiatedDefaultArg(D->getUninstantiatedDefaultArg());
|
||||
|
||||
// Note: we don't try to instantiate function parameters until after
|
||||
// we've instantiated the function's type. Therefore, we don't have
|
||||
|
|
Loading…
Reference in New Issue