Author: ggreif
Date: Wed Mar 18 18:47:39 2009
New Revision: 67259
URL: http://llvm.org/viewvc/llvm-project?rev=67259&view=rev
Log:
Use the instantiated expressions to build the ConditionalOperator. This
addresses the second part of review feedback.
Modified:
cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp
Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp?rev=67259&r1=67258&r2=67259&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp Wed Mar 18 18:47:39 2009
@@ -843,15 +843,11 @@
// 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<Expr>(),
+
True.takeAs<Expr>(),
+
False.takeAs<Expr>(),
+ E->getType()));
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits