[cfe-commits] r82760 - /cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
Douglas Gregor
dgregor at apple.com
Thu Sep 24 23:56:32 PDT 2009
Author: dgregor
Date: Fri Sep 25 01:56:31 2009
New Revision: 82760
URL: http://llvm.org/viewvc/llvm-project?rev=82760&view=rev
Log:
Be careful about copying uninstantiated default arguments during template instantiation
Modified:
cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp?rev=82760&r1=82759&r2=82760&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Fri Sep 25 01:56:31 2009
@@ -709,8 +709,8 @@
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
More information about the cfe-commits
mailing list