summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2009-03-18 23:47:39 +0000
committerGabor Greif <ggreif@gmail.com>2009-03-18 23:47:39 +0000
commit5e09283e5a046abc0f01c9ad753419c84fc4e60c (patch)
treebb1743f9bf42021e9dc5f24afdeec93176281878 /clang
parent6afd73391eee9fc8b657eb1c55c65da6f1a4b8a4 (diff)
downloadbcm5719-llvm-5e09283e5a046abc0f01c9ad753419c84fc4e60c.tar.gz
bcm5719-llvm-5e09283e5a046abc0f01c9ad753419c84fc4e60c.zip
Use the instantiated expressions to build the ConditionalOperator. This addresses the second part of review feedback.
llvm-svn: 67259
Diffstat (limited to 'clang')
-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