From: Gabor Greif Date: Wed, 18 Mar 2009 23:47:39 +0000 (+0000) Subject: Use the instantiated expressions to build the ConditionalOperator. This addresses... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb26eea4cfb9c9b121bdd7d678d8670689819ae0;p=clang Use the instantiated expressions to build the ConditionalOperator. This addresses the second part of review feedback. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67259 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp index 427946ad7c..4341fc94f9 100644 --- a/lib/Sema/SemaTemplateInstantiate.cpp +++ b/lib/Sema/SemaTemplateInstantiate.cpp @@ -843,15 +843,11 @@ TemplateExprInstantiator::VisitConditionalOperator(ConditionalOperator *E) { // Since our original expression was not type-dependent, we do not // perform lookup again at instantiation time (C++ [temp.dep]p1). // Instead, we just build the new conditional operator call expression. - Cond.release(); - True.release(); - False.release(); - // FIXME: Don't reuse the parts here. We need to instantiate them. return SemaRef.Owned(new (SemaRef.Context) ConditionalOperator( - E->getCond(), - E->getTrueExpr(), - E->getFalseExpr(), - E->getType())); + Cond.takeAs(), + True.takeAs(), + False.takeAs(), + E->getType())); }