Be careful about copying uninstantiated default arguments during template instantiation

llvm-svn: 82760
This commit is contained in:
Douglas Gregor 2009-09-25 06:56:31 +00:00
parent 233117b7f6
commit c103ccd855
1 changed files with 2 additions and 2 deletions

View File

@ -709,8 +709,8 @@ ParmVarDecl *TemplateDeclInstantiator::VisitParmVarDecl(ParmVarDecl *D) {
D->getStorageClass(), 0); D->getStorageClass(), 0);
// Mark the default argument as being uninstantiated. // Mark the default argument as being uninstantiated.
if (Expr *Arg = D->getDefaultArg()) if (D->hasUninstantiatedDefaultArg())
Param->setUninstantiatedDefaultArg(Arg); Param->setUninstantiatedDefaultArg(D->getUninstantiatedDefaultArg());
// Note: we don't try to instantiate function parameters until after // Note: we don't try to instantiate function parameters until after
// we've instantiated the function's type. Therefore, we don't have // we've instantiated the function's type. Therefore, we don't have