diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-25 06:56:31 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-25 06:56:31 +0000 |
commit | f43d0b37c1d3f529d0f206e786ae6de61c5f364a (patch) | |
tree | 531dd251fb4e55ebabf7318b024769b68b659d3f /lib/Sema/SemaTemplateInstantiateDecl.cpp | |
parent | d781a39b9ecc273e9d64cf8b327dcf7efd287e7f (diff) |
Be careful about copying uninstantiated default arguments during template instantiation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiateDecl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index 0564cbefa6..fc51684f9e 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -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 |