summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiate.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp
index 427946ad7c7..4341fc94f90 100644
--- a/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/clang/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<Expr>(),
+ True.takeAs<Expr>(),
+ False.takeAs<Expr>(),
+ E->getType()));
}
OpenPOWER on IntegriCloud