aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiate.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-10-26 07:05:15 +0000
committerJohn McCall <rjmccall@apple.com>2010-10-26 07:05:15 +0000
commit3fa5cae9b3812cab9fab6c042c3329bb70a3d046 (patch)
treea1d19022b68244d828f3ca8aa97de54c217744e3 /lib/Sema/SemaTemplateInstantiate.cpp
parentdbfd0455d301a070630a7bd5c8bb4a6389886e24 (diff)
No really, we don't have a retain/release system for statements/expressions
anymore. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117357 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiate.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp
index 3230e02e54..71235d9285 100644
--- a/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/lib/Sema/SemaTemplateInstantiate.cpp
@@ -776,7 +776,7 @@ TemplateInstantiator::RebuildElaboratedType(ElaboratedTypeKeyword Keyword,
ExprResult
TemplateInstantiator::TransformPredefinedExpr(PredefinedExpr *E) {
if (!E->isTypeDependent())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
FunctionDecl *currentDecl = getSema().getCurFunctionDecl();
assert(currentDecl && "Must have current function declaration when "
@@ -804,7 +804,7 @@ TemplateInstantiator::TransformTemplateParmRefExpr(DeclRefExpr *E,
// arguments left unspecified.
if (!TemplateArgs.hasTemplateArgument(NTTP->getDepth(),
NTTP->getPosition()))
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
const TemplateArgument &Arg = TemplateArgs(NTTP->getDepth(),
NTTP->getPosition());
@@ -812,7 +812,7 @@ TemplateInstantiator::TransformTemplateParmRefExpr(DeclRefExpr *E,
// The template argument itself might be an expression, in which
// case we just return that expression.
if (Arg.getKind() == TemplateArgument::Expression)
- return SemaRef.Owned(Arg.getAsExpr()->Retain());
+ return SemaRef.Owned(Arg.getAsExpr());
if (Arg.getKind() == TemplateArgument::Declaration) {
ValueDecl *VD = cast<ValueDecl>(Arg.getAsDecl());