[cfe-commits] r117357 - in /cfe/trunk: include/clang/AST/Expr.h include/clang/AST/Stmt.h lib/AST/ASTContext.cpp lib/Sema/SemaDeclCXX.cpp lib/Sema/SemaExprCXX.cpp lib/Sema/SemaExprObjC.cpp lib/Sema/SemaInit.cpp lib/Sema/SemaOverload.cpp lib/Sema/SemaTemplate.cpp lib/Sema/SemaTemplateDeduction.cpp lib/Sema/SemaTemplateInstantiate.cpp lib/Sema/SemaTemplateInstantiateDecl.cpp lib/Sema/TreeTransform.h lib/Serialization/ASTReaderStmt.cpp
John McCall
rjmccall at apple.com
Tue Oct 26 00:05:16 PDT 2010
Author: rjmccall
Date: Tue Oct 26 02:05:15 2010
New Revision: 117357
URL: http://llvm.org/viewvc/llvm-project?rev=117357&view=rev
Log:
No really, we don't have a retain/release system for statements/expressions
anymore.
Modified:
cfe/trunk/include/clang/AST/Expr.h
cfe/trunk/include/clang/AST/Stmt.h
cfe/trunk/lib/AST/ASTContext.cpp
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
cfe/trunk/lib/Sema/SemaExprCXX.cpp
cfe/trunk/lib/Sema/SemaExprObjC.cpp
cfe/trunk/lib/Sema/SemaInit.cpp
cfe/trunk/lib/Sema/SemaOverload.cpp
cfe/trunk/lib/Sema/SemaTemplate.cpp
cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp
cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp
cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
cfe/trunk/lib/Sema/TreeTransform.h
cfe/trunk/lib/Serialization/ASTReaderStmt.cpp
Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=117357&r1=117356&r2=117357&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Tue Oct 26 02:05:15 2010
@@ -77,15 +77,6 @@
explicit Expr(StmtClass SC, EmptyShell) : Stmt(SC) { }
public:
- /// \brief Increases the reference count for this expression.
- ///
- /// Invoke the Retain() operation when this expression
- /// is being shared by another owner.
- Expr *Retain() {
- Stmt::Retain();
- return this;
- }
-
QualType getType() const { return TR; }
void setType(QualType t) {
// In C++, the type of an expression is always adjusted so that it
Modified: cfe/trunk/include/clang/AST/Stmt.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=117357&r1=117356&r2=117357&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Tue Oct 26 02:05:15 2010
@@ -109,9 +109,6 @@
/// \brief The statement class.
const unsigned sClass : 8;
- /// \brief The reference count for this statement.
- unsigned RefCount : 24;
-
// Make vanilla 'new' and 'delete' illegal for Stmts.
protected:
void* operator new(size_t bytes) throw() {
@@ -152,36 +149,17 @@
protected:
/// \brief Construct an empty statement.
- explicit Stmt(StmtClass SC, EmptyShell) : sClass(SC), RefCount(1) {
+ explicit Stmt(StmtClass SC, EmptyShell) : sClass(SC) {
if (Stmt::CollectingStats()) Stmt::addStmtClass(SC);
}
public:
- Stmt(StmtClass SC) : sClass(SC), RefCount(1) {
+ Stmt(StmtClass SC) : sClass(SC) {
if (Stmt::CollectingStats()) Stmt::addStmtClass(SC);
}
virtual ~Stmt() {}
-#ifndef NDEBUG
- /// \brief True if this statement's refcount is in a valid state.
- /// Should be used only in assertions.
- bool isRetained() const {
- return (RefCount >= 1);
- }
-#endif
-
- /// \brief Increases the reference count for this statement.
- ///
- /// Invoke the Retain() operation when this statement or expression
- /// is being shared by another owner.
- Stmt *Retain() {
- assert(RefCount >= 1);
- ++RefCount;
- return this;
- }
-
StmtClass getStmtClass() const {
- assert(RefCount >= 1 && "Referencing already-destroyed statement!");
return (StmtClass)sClass;
}
const char *getStmtClassName() const;
@@ -726,7 +704,6 @@
}
void addSwitchCase(SwitchCase *SC) {
assert(!SC->getNextSwitchCase() && "case/default already added to a switch");
- SC->Retain();
SC->setNextSwitchCase(FirstCase);
FirstCase = SC;
}
Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=117357&r1=117356&r2=117357&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Tue Oct 26 02:05:15 2010
@@ -1492,8 +1492,6 @@
QualType CanonType;
if (!EltTy.isCanonical()) {
- if (NumElts)
- NumElts->Retain();
CanonType = getVariableArrayType(getCanonicalType(EltTy), NumElts, ASM,
EltTypeQuals, Brackets);
}
@@ -2522,16 +2520,14 @@
if (DependentSizedArrayType *DSAT = dyn_cast<DependentSizedArrayType>(AT))
return CanQualType::CreateUnsafe(
getDependentSizedArrayType(NewEltTy,
- DSAT->getSizeExpr() ?
- DSAT->getSizeExpr()->Retain() : 0,
+ DSAT->getSizeExpr(),
DSAT->getSizeModifier(),
DSAT->getIndexTypeCVRQualifiers(),
DSAT->getBracketsRange())->getCanonicalTypeInternal());
VariableArrayType *VAT = cast<VariableArrayType>(AT);
return CanQualType::CreateUnsafe(getVariableArrayType(NewEltTy,
- VAT->getSizeExpr() ?
- VAT->getSizeExpr()->Retain() : 0,
+ VAT->getSizeExpr(),
VAT->getSizeModifier(),
VAT->getIndexTypeCVRQualifiers(),
VAT->getBracketsRange()));
@@ -2561,15 +2557,14 @@
if (const VariableArrayType *VAT = dyn_cast<VariableArrayType>(AT)) {
return getVariableArrayType(UnqualElt,
- VAT->getSizeExpr() ?
- VAT->getSizeExpr()->Retain() : 0,
+ VAT->getSizeExpr(),
VAT->getSizeModifier(),
VAT->getIndexTypeCVRQualifiers(),
VAT->getBracketsRange());
}
const DependentSizedArrayType *DSAT = cast<DependentSizedArrayType>(AT);
- return getDependentSizedArrayType(UnqualElt, DSAT->getSizeExpr()->Retain(),
+ return getDependentSizedArrayType(UnqualElt, DSAT->getSizeExpr(),
DSAT->getSizeModifier(), 0,
SourceRange());
}
@@ -2791,16 +2786,14 @@
= dyn_cast<DependentSizedArrayType>(ATy))
return cast<ArrayType>(
getDependentSizedArrayType(NewEltTy,
- DSAT->getSizeExpr() ?
- DSAT->getSizeExpr()->Retain() : 0,
+ DSAT->getSizeExpr(),
DSAT->getSizeModifier(),
DSAT->getIndexTypeCVRQualifiers(),
DSAT->getBracketsRange()));
const VariableArrayType *VAT = cast<VariableArrayType>(ATy);
return cast<ArrayType>(getVariableArrayType(NewEltTy,
- VAT->getSizeExpr() ?
- VAT->getSizeExpr()->Retain() : 0,
+ VAT->getSizeExpr(),
VAT->getSizeModifier(),
VAT->getIndexTypeCVRQualifiers(),
VAT->getBracketsRange()));
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=117357&r1=117356&r2=117357&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Tue Oct 26 02:05:15 2010
@@ -1328,10 +1328,6 @@
// initializer. However, deconstructing the ASTs is a dicey process,
// and this approach is far more likely to get the corner cases right.
if (CurContext->isDependentContext()) {
- // Bump the reference count of all of the arguments.
- for (unsigned I = 0; I != NumArgs; ++I)
- Args[I]->Retain();
-
Expr *Init = new (Context) ParenListExpr(Context, LParenLoc, Args, NumArgs,
RParenLoc);
return new (Context) CXXBaseOrMemberInitializer(Context, Member, IdLoc,
@@ -1461,10 +1457,6 @@
// initializer. However, deconstructing the ASTs is a dicey process,
// and this approach is far more likely to get the corner cases right.
if (CurContext->isDependentContext()) {
- // Bump the reference count of all of the arguments.
- for (unsigned I = 0; I != NumArgs; ++I)
- Args[I]->Retain();
-
ExprResult Init
= Owned(new (Context) ParenListExpr(Context, LParenLoc, Args, NumArgs,
RParenLoc));
@@ -4646,14 +4638,14 @@
llvm::APInt Upper = ArrayTy->getSize();
Upper.zextOrTrunc(S.Context.getTypeSize(SizeType));
Expr *Comparison
- = new (S.Context) BinaryOperator(IterationVarRef->Retain(),
+ = new (S.Context) BinaryOperator(IterationVarRef,
IntegerLiteral::Create(S.Context,
Upper, SizeType, Loc),
BO_NE, S.Context.BoolTy, Loc);
// Create the pre-increment of the iteration variable.
Expr *Increment
- = new (S.Context) UnaryOperator(IterationVarRef->Retain(),
+ = new (S.Context) UnaryOperator(IterationVarRef,
UO_PreInc,
SizeType, Loc);
@@ -4936,7 +4928,7 @@
// Construct the "from" expression, which is an implicit cast to the
// appropriately-qualified base type.
- Expr *From = OtherRef->Retain();
+ Expr *From = OtherRef;
ImpCastExprToType(From, Context.getQualifiedType(BaseType, OtherQuals),
CK_UncheckedDerivedToBase,
VK_LValue, &BasePath);
Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=117357&r1=117356&r2=117357&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Tue Oct 26 02:05:15 2010
@@ -879,7 +879,7 @@
for (CXXConstructExpr::arg_iterator A = Construct->arg_begin(),
AEnd = Construct->arg_end();
A != AEnd; ++A)
- ConvertedConstructorArgs.push_back(A->Retain());
+ ConvertedConstructorArgs.push_back(*A);
} else {
// Take the converted initializer.
ConvertedConstructorArgs.push_back(FullInit.release());
@@ -1206,7 +1206,7 @@
Context,
FnDecl->getParamDecl(i)),
SourceLocation(),
- Owned(Args[i]->Retain()));
+ Owned(Args[i]));
if (Result.isInvalid())
return true;
Modified: cfe/trunk/lib/Sema/SemaExprObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprObjC.cpp?rev=117357&r1=117356&r2=117357&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprObjC.cpp Tue Oct 26 02:05:15 2010
@@ -250,9 +250,7 @@
InitializedEntity Entity = InitializedEntity::InitializeParameter(Context,
Param);
- ExprResult ArgE = PerformCopyInitialization(Entity,
- SourceLocation(),
- Owned(argExpr->Retain()));
+ ExprResult ArgE = PerformCopyInitialization(Entity, lbrac, Owned(argExpr));
if (ArgE.isInvalid())
IsError = true;
else
Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=117357&r1=117356&r2=117357&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Tue Oct 26 02:05:15 2010
@@ -3569,7 +3569,7 @@
case SK_StringInit:
case SK_ObjCObjectConversion:
assert(Args.size() == 1);
- CurInit = ExprResult(((Expr **)(Args.get()))[0]->Retain());
+ CurInit = ExprResult(Args.get()[0]);
if (CurInit.isInvalid())
return ExprError();
break;
Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=117357&r1=117356&r2=117357&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Tue Oct 26 02:05:15 2010
@@ -7839,7 +7839,7 @@
Expr *SubExpr = FixOverloadedFunctionReference(PE->getSubExpr(),
Found, Fn);
if (SubExpr == PE->getSubExpr())
- return PE->Retain();
+ return PE;
return new (Context) ParenExpr(PE->getLParen(), PE->getRParen(), SubExpr);
}
@@ -7852,7 +7852,7 @@
"Implicit cast type cannot be determined from overload");
assert(ICE->path_empty() && "fixing up hierarchy conversion?");
if (SubExpr == ICE->getSubExpr())
- return ICE->Retain();
+ return ICE;
return ImplicitCastExpr::Create(Context, ICE->getType(),
ICE->getCastKind(),
@@ -7874,7 +7874,7 @@
Expr *SubExpr = FixOverloadedFunctionReference(UnOp->getSubExpr(),
Found, Fn);
if (SubExpr == UnOp->getSubExpr())
- return UnOp->Retain();
+ return UnOp;
assert(isa<DeclRefExpr>(SubExpr)
&& "fixed to something other than a decl ref");
@@ -7896,7 +7896,7 @@
Expr *SubExpr = FixOverloadedFunctionReference(UnOp->getSubExpr(),
Found, Fn);
if (SubExpr == UnOp->getSubExpr())
- return UnOp->Retain();
+ return UnOp;
return new (Context) UnaryOperator(SubExpr, UO_AddrOf,
Context.getPointerType(SubExpr->getType()),
@@ -7949,7 +7949,7 @@
/*isImplicit=*/true);
}
} else
- Base = MemExpr->getBase()->Retain();
+ Base = MemExpr->getBase();
return MemberExpr::Create(Context, Base,
MemExpr->isArrow(),
@@ -7962,8 +7962,8 @@
Fn->getType());
}
- assert(false && "Invalid reference to overloaded function");
- return E->Retain();
+ llvm_unreachable("Invalid reference to overloaded function");
+ return E;
}
ExprResult Sema::FixOverloadedFunctionReference(ExprResult E,
Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=117357&r1=117356&r2=117357&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Tue Oct 26 02:05:15 2010
@@ -2729,7 +2729,7 @@
// Stop checking the precise nature of the argument if it is value dependent,
// it should be checked when instantiated.
if (Arg->isValueDependent()) {
- Converted = TemplateArgument(ArgIn->Retain());
+ Converted = TemplateArgument(ArgIn);
return false;
}
@@ -2974,7 +2974,7 @@
(isa<VarDecl>(VD) &&
Context.getCanonicalType(VD->getType()).isConstQualified())) {
if (Arg->isTypeDependent() || Arg->isValueDependent())
- Converted = TemplateArgument(Arg->Retain());
+ Converted = TemplateArgument(Arg);
else
Converted = TemplateArgument(VD->getCanonicalDecl());
return Invalid;
@@ -2998,7 +2998,7 @@
// Okay: this is the address of a non-static member, and therefore
// a member pointer constant.
if (Arg->isTypeDependent() || Arg->isValueDependent())
- Converted = TemplateArgument(Arg->Retain());
+ Converted = TemplateArgument(Arg);
else
Converted = TemplateArgument(DRE->getDecl()->getCanonicalDecl());
return Invalid;
Modified: cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp?rev=117357&r1=117356&r2=117357&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp Tue Oct 26 02:05:15 2010
@@ -151,7 +151,7 @@
"Expression template argument must be type- or value-dependent.");
if (Deduced[NTTP->getIndex()].isNull()) {
- Deduced[NTTP->getIndex()] = TemplateArgument(Value->Retain());
+ Deduced[NTTP->getIndex()] = TemplateArgument(Value);
return Sema::TDK_Success;
}
Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp?rev=117357&r1=117356&r2=117357&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp Tue Oct 26 02:05:15 2010
@@ -776,7 +776,7 @@
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 @@
// 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 @@
// 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());
Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp?rev=117357&r1=117356&r2=117357&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Tue Oct 26 02:05:15 2010
@@ -586,7 +586,7 @@
return 0;
ExprResult Message(D->getMessage());
- D->getMessage()->Retain();
+ D->getMessage();
return SemaRef.ActOnStaticAssertDeclaration(D->getLocation(),
InstantiatedAssertExpr.get(),
Message.get());
Modified: cfe/trunk/lib/Sema/TreeTransform.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=117357&r1=117356&r2=117357&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/TreeTransform.h (original)
+++ cfe/trunk/lib/Sema/TreeTransform.h Tue Oct 26 02:05:15 2010
@@ -2007,7 +2007,7 @@
}
}
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
}
@@ -2025,7 +2025,7 @@
#include "clang/AST/StmtNodes.inc"
}
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
template<typename Derived>
@@ -3483,7 +3483,7 @@
template<typename Derived>
StmtResult
TreeTransform<Derived>::TransformNullStmt(NullStmt *S) {
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
}
template<typename Derived>
@@ -3522,7 +3522,7 @@
if (!getDerived().AlwaysRebuild() &&
!SubStmtChanged)
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
return getDerived().RebuildCompoundStmt(S->getLBracLoc(),
move_arg(Statements),
@@ -3646,7 +3646,7 @@
ConditionVar == S->getConditionVariable() &&
Then.get() == S->getThen() &&
Else.get() == S->getElse())
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
return getDerived().RebuildIfStmt(S->getIfLoc(), FullCond, ConditionVar,
Then.get(),
@@ -3757,7 +3757,7 @@
if (!getDerived().AlwaysRebuild() &&
Cond.get() == S->getCond() &&
Body.get() == S->getBody())
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
return getDerived().RebuildDoStmt(S->getDoLoc(), Body.get(), S->getWhileLoc(),
/*FIXME:*/S->getWhileLoc(), Cond.get(),
@@ -3824,7 +3824,7 @@
FullCond.get() == S->getCond() &&
Inc.get() == S->getInc() &&
Body.get() == S->getBody())
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
return getDerived().RebuildForStmt(S->getForLoc(), S->getLParenLoc(),
Init.get(), FullCond, ConditionVar,
@@ -3848,7 +3848,7 @@
if (!getDerived().AlwaysRebuild() &&
Target.get() == S->getTarget())
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
return getDerived().RebuildIndirectGotoStmt(S->getGotoLoc(), S->getStarLoc(),
Target.get());
@@ -3857,13 +3857,13 @@
template<typename Derived>
StmtResult
TreeTransform<Derived>::TransformContinueStmt(ContinueStmt *S) {
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
}
template<typename Derived>
StmtResult
TreeTransform<Derived>::TransformBreakStmt(BreakStmt *S) {
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
}
template<typename Derived>
@@ -3897,7 +3897,7 @@
}
if (!getDerived().AlwaysRebuild() && !DeclChanged)
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
return getDerived().RebuildDeclStmt(Decls.data(), Decls.size(),
S->getStartLoc(), S->getEndLoc());
@@ -3907,7 +3907,7 @@
StmtResult
TreeTransform<Derived>::TransformSwitchCase(SwitchCase *S) {
assert(false && "SwitchCase is abstract and cannot be transformed");
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
}
template<typename Derived>
@@ -3928,7 +3928,7 @@
Names.push_back(S->getOutputIdentifier(I));
// No need to transform the constraint literal.
- Constraints.push_back(S->getOutputConstraintLiteral(I)->Retain());
+ Constraints.push_back(S->getOutputConstraintLiteral(I));
// Transform the output expr.
Expr *OutputExpr = S->getOutputExpr(I);
@@ -3946,7 +3946,7 @@
Names.push_back(S->getInputIdentifier(I));
// No need to transform the constraint literal.
- Constraints.push_back(S->getInputConstraintLiteral(I)->Retain());
+ Constraints.push_back(S->getInputConstraintLiteral(I));
// Transform the input expr.
Expr *InputExpr = S->getInputExpr(I);
@@ -3960,11 +3960,11 @@
}
if (!getDerived().AlwaysRebuild() && !ExprsChanged)
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
// Go through the clobbers.
for (unsigned I = 0, E = S->getNumClobbers(); I != E; ++I)
- Clobbers.push_back(S->getClobber(I)->Retain());
+ Clobbers.push_back(S->getClobber(I));
// No need to transform the asm string literal.
AsmString = SemaRef.Owned(S->getAsmString());
@@ -4017,7 +4017,7 @@
TryBody.get() == S->getTryBody() &&
!AnyCatchChanged &&
Finally.get() == S->getFinallyStmt())
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
// Build a new statement.
return getDerived().RebuildObjCAtTryStmt(S->getAtTryLoc(), TryBody.get(),
@@ -4071,7 +4071,7 @@
// If nothing changed, just retain this statement.
if (!getDerived().AlwaysRebuild() &&
Body.get() == S->getFinallyBody())
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
// Build a new statement.
return getDerived().RebuildObjCAtFinallyStmt(S->getAtFinallyLoc(),
@@ -4090,7 +4090,7 @@
if (!getDerived().AlwaysRebuild() &&
Operand.get() == S->getThrowExpr())
- return getSema().Owned(S->Retain());
+ return getSema().Owned(S);
return getDerived().RebuildObjCAtThrowStmt(S->getThrowLoc(), Operand.get());
}
@@ -4113,7 +4113,7 @@
if (!getDerived().AlwaysRebuild() &&
Object.get() == S->getSynchExpr() &&
Body.get() == S->getSynchBody())
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
// Build a new statement.
return getDerived().RebuildObjCAtSynchronizedStmt(S->getAtSynchronizedLoc(),
@@ -4144,7 +4144,7 @@
Element.get() == S->getElement() &&
Collection.get() == S->getCollection() &&
Body.get() == S->getBody())
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
// Build a new statement.
return getDerived().RebuildObjCForCollectionStmt(S->getForLoc(),
@@ -4183,7 +4183,7 @@
if (!getDerived().AlwaysRebuild() &&
!Var &&
Handler.get() == S->getHandlerBlock())
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
return getDerived().RebuildCXXCatchStmt(S->getCatchLoc(),
Var,
@@ -4215,7 +4215,7 @@
if (!getDerived().AlwaysRebuild() &&
TryBlock.get() == S->getTryBlock() &&
!HandlerChanged)
- return SemaRef.Owned(S->Retain());
+ return SemaRef.Owned(S);
return getDerived().RebuildCXXTryStmt(S->getTryLoc(), TryBlock.get(),
move_arg(Handlers));
@@ -4227,7 +4227,7 @@
template<typename Derived>
ExprResult
TreeTransform<Derived>::TransformPredefinedExpr(PredefinedExpr *E) {
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
template<typename Derived>
@@ -4264,7 +4264,7 @@
// FIXME: this is a bit instantiation-specific.
SemaRef.MarkDeclarationReferenced(E->getLocation(), ND);
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
TemplateArgumentListInfo TransArgs, *TemplateArgs = 0;
@@ -4287,31 +4287,31 @@
template<typename Derived>
ExprResult
TreeTransform<Derived>::TransformIntegerLiteral(IntegerLiteral *E) {
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
template<typename Derived>
ExprResult
TreeTransform<Derived>::TransformFloatingLiteral(FloatingLiteral *E) {
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
template<typename Derived>
ExprResult
TreeTransform<Derived>::TransformImaginaryLiteral(ImaginaryLiteral *E) {
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
template<typename Derived>
ExprResult
TreeTransform<Derived>::TransformStringLiteral(StringLiteral *E) {
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
template<typename Derived>
ExprResult
TreeTransform<Derived>::TransformCharacterLiteral(CharacterLiteral *E) {
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
template<typename Derived>
@@ -4322,7 +4322,7 @@
return ExprError();
if (!getDerived().AlwaysRebuild() && SubExpr.get() == E->getSubExpr())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildParenExpr(SubExpr.get(), E->getLParen(),
E->getRParen());
@@ -4336,7 +4336,7 @@
return ExprError();
if (!getDerived().AlwaysRebuild() && SubExpr.get() == E->getSubExpr())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildUnaryOperator(E->getOperatorLoc(),
E->getOpcode(),
@@ -4401,7 +4401,7 @@
if (!getDerived().AlwaysRebuild() &&
Type == E->getTypeSourceInfo() &&
!ExprChanged)
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
// Build a new offsetof expression.
return getDerived().RebuildOffsetOfExpr(E->getOperatorLoc(), Type,
@@ -4420,7 +4420,7 @@
return ExprError();
if (!getDerived().AlwaysRebuild() && OldT == NewT)
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildSizeOfAlignOf(NewT, E->getOperatorLoc(),
E->isSizeOf(),
@@ -4439,7 +4439,7 @@
return ExprError();
if (!getDerived().AlwaysRebuild() && SubExpr.get() == E->getArgumentExpr())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
return getDerived().RebuildSizeOfAlignOf(SubExpr.get(), E->getOperatorLoc(),
@@ -4462,7 +4462,7 @@
if (!getDerived().AlwaysRebuild() &&
LHS.get() == E->getLHS() &&
RHS.get() == E->getRHS())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildArraySubscriptExpr(LHS.get(),
/*FIXME:*/E->getLHS()->getLocStart(),
@@ -4493,7 +4493,7 @@
if (!getDerived().AlwaysRebuild() &&
Callee.get() == E->getCallee() &&
!ArgChanged)
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
// FIXME: Wrong source location information for the '('.
SourceLocation FakeLParenLoc
@@ -4545,7 +4545,7 @@
// Mark it referenced in the new context regardless.
// FIXME: this is a bit instantiation-specific.
SemaRef.MarkDeclarationReferenced(E->getMemberLoc(), Member);
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
TemplateArgumentListInfo TransArgs;
@@ -4596,7 +4596,7 @@
if (!getDerived().AlwaysRebuild() &&
LHS.get() == E->getLHS() &&
RHS.get() == E->getRHS())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildBinaryOperator(E->getOperatorLoc(), E->getOpcode(),
LHS.get(), RHS.get());
@@ -4628,7 +4628,7 @@
Cond.get() == E->getCond() &&
LHS.get() == E->getLHS() &&
RHS.get() == E->getRHS())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildConditionalOperator(Cond.get(),
E->getQuestionLoc(),
@@ -4660,7 +4660,7 @@
if (!getDerived().AlwaysRebuild() &&
Type == E->getTypeInfoAsWritten() &&
SubExpr.get() == E->getSubExpr())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildCStyleCastExpr(E->getLParenLoc(),
Type,
@@ -4683,7 +4683,7 @@
if (!getDerived().AlwaysRebuild() &&
OldT == NewT &&
Init.get() == E->getInitializer())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
// Note: the expression type doesn't necessarily match the
// type-as-written, but that's okay, because it should always be
@@ -4703,7 +4703,7 @@
if (!getDerived().AlwaysRebuild() &&
Base.get() == E->getBase())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
// FIXME: Bad source location
SourceLocation FakeOperatorLoc
@@ -4729,7 +4729,7 @@
}
if (!getDerived().AlwaysRebuild() && !InitChanged)
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildInitList(E->getLBraceLoc(), move_arg(Inits),
E->getRBraceLoc(), E->getType());
@@ -4796,7 +4796,7 @@
if (!getDerived().AlwaysRebuild() &&
Init.get() == E->getInit() &&
!ExprChanged)
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildDesignatedInitExpr(Desig, move_arg(ArrayExprs),
E->getEqualOrColonLoc(),
@@ -4817,7 +4817,7 @@
if (!getDerived().AlwaysRebuild() &&
T == E->getType())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildImplicitValueInitExpr(T);
}
@@ -4836,7 +4836,7 @@
if (!getDerived().AlwaysRebuild() &&
TInfo == E->getWrittenTypeInfo() &&
SubExpr.get() == E->getSubExpr())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildVAArgExpr(E->getBuiltinLoc(), SubExpr.get(),
TInfo, E->getRParenLoc());
@@ -4883,7 +4883,7 @@
if (!getDerived().AlwaysRebuild() &&
SubStmt.get() == E->getSubStmt())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildStmtExpr(E->getLParenLoc(),
SubStmt.get(),
@@ -4907,7 +4907,7 @@
if (!getDerived().AlwaysRebuild() &&
TInfo1 == E->getArgTInfo1() &&
TInfo2 == E->getArgTInfo2())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildTypesCompatibleExpr(E->getBuiltinLoc(),
TInfo1, TInfo2,
@@ -4933,7 +4933,7 @@
Cond.get() == E->getCond() &&
LHS.get() == E->getLHS() &&
RHS.get() == E->getRHS())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildChooseExpr(E->getBuiltinLoc(),
Cond.get(), LHS.get(), RHS.get(),
@@ -4943,7 +4943,7 @@
template<typename Derived>
ExprResult
TreeTransform<Derived>::TransformGNUNullExpr(GNUNullExpr *E) {
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
template<typename Derived>
@@ -5026,7 +5026,7 @@
Callee.get() == E->getCallee() &&
First.get() == E->getArg(0) &&
(E->getNumArgs() != 2 || Second.get() == E->getArg(1)))
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildCXXOperatorCallExpr(E->getOperator(),
E->getOperatorLoc(),
@@ -5056,7 +5056,7 @@
if (!getDerived().AlwaysRebuild() &&
Type == E->getTypeInfoAsWritten() &&
SubExpr.get() == E->getSubExpr())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
// FIXME: Poor source location information here.
SourceLocation FakeLAngleLoc
@@ -5116,7 +5116,7 @@
if (!getDerived().AlwaysRebuild() &&
Type == E->getTypeInfoAsWritten() &&
SubExpr.get() == E->getSubExpr())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildCXXFunctionalCastExpr(Type,
/*FIXME:*/E->getSubExpr()->getLocStart(),
@@ -5135,7 +5135,7 @@
if (!getDerived().AlwaysRebuild() &&
TInfo == E->getTypeOperandSourceInfo())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildCXXTypeidExpr(E->getType(),
E->getLocStart(),
@@ -5155,7 +5155,7 @@
if (!getDerived().AlwaysRebuild() &&
SubExpr.get() == E->getExprOperand())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildCXXTypeidExpr(E->getType(),
E->getLocStart(),
@@ -5174,7 +5174,7 @@
if (!getDerived().AlwaysRebuild() &&
TInfo == E->getTypeOperandSourceInfo())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildCXXTypeidExpr(E->getType(),
E->getLocStart(),
@@ -5193,7 +5193,7 @@
if (!getDerived().AlwaysRebuild() &&
SubExpr.get() == E->getExprOperand())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildCXXUuidofExpr(E->getType(),
E->getLocStart(),
@@ -5204,14 +5204,14 @@
template<typename Derived>
ExprResult
TreeTransform<Derived>::TransformCXXBoolLiteralExpr(CXXBoolLiteralExpr *E) {
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
template<typename Derived>
ExprResult
TreeTransform<Derived>::TransformCXXNullPtrLiteralExpr(
CXXNullPtrLiteralExpr *E) {
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
template<typename Derived>
@@ -5222,7 +5222,7 @@
QualType T = MD->getThisType(getSema().Context);
if (!getDerived().AlwaysRebuild() && T == E->getType())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildCXXThisExpr(E->getLocStart(), T, E->isImplicit());
}
@@ -5236,7 +5236,7 @@
if (!getDerived().AlwaysRebuild() &&
SubExpr.get() == E->getSubExpr())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildCXXThrowExpr(E->getThrowLoc(), SubExpr.get());
}
@@ -5252,7 +5252,7 @@
if (!getDerived().AlwaysRebuild() &&
Param == E->getParam())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildCXXDefaultArgExpr(E->getUsedLocation(), Param);
}
@@ -5267,7 +5267,7 @@
if (!getDerived().AlwaysRebuild() &&
T == E->getTypeSourceInfo())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildCXXScalarValueInitExpr(T,
/*FIXME:*/T->getTypeLoc().getEndLoc(),
@@ -5364,7 +5364,7 @@
SemaRef.MarkDeclarationReferenced(E->getLocStart(), OperatorNew);
if (OperatorDelete)
SemaRef.MarkDeclarationReferenced(E->getLocStart(), OperatorDelete);
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
QualType AllocType = AllocTypeInfo->getType();
@@ -5388,7 +5388,7 @@
} else if (const DependentSizedArrayType *DepArrayT
= dyn_cast<DependentSizedArrayType>(ArrayT)) {
if (DepArrayT->getSizeExpr()) {
- ArraySize = SemaRef.Owned(DepArrayT->getSizeExpr()->Retain());
+ ArraySize = SemaRef.Owned(DepArrayT->getSizeExpr());
AllocType = DepArrayT->getElementType();
}
}
@@ -5443,7 +5443,7 @@
}
}
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
return getDerived().RebuildCXXDeleteExpr(E->getLocStart(),
@@ -5622,7 +5622,7 @@
if (!getDerived().AlwaysRebuild() &&
T == E->getQueriedTypeSourceInfo())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildUnaryTypeTrait(E->getTrait(),
E->getLocStart(),
@@ -5651,7 +5651,7 @@
// Note: it is sufficient to compare the Name component of NameInfo:
// if name has not changed, DNLoc has not changed either.
NameInfo.getName() == E->getDeclName())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildDependentScopeDeclRefExpr(NNS,
E->getQualifierRange(),
@@ -5720,7 +5720,7 @@
// Mark the constructor as referenced.
// FIXME: Instantiation-specific
SemaRef.MarkDeclarationReferenced(E->getLocStart(), Constructor);
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
return getDerived().RebuildCXXConstructExpr(T, /*FIXME:*/E->getLocStart(),
@@ -5793,7 +5793,7 @@
!ArgumentChanged) {
// FIXME: Instantiation-specific
SemaRef.MarkDeclarationReferenced(E->getLocStart(), Constructor);
- return SemaRef.MaybeBindToTemporary(E->Retain());
+ return SemaRef.MaybeBindToTemporary(E);
}
return getDerived().RebuildCXXTemporaryObjectExpr(T,
@@ -5826,7 +5826,7 @@
if (!getDerived().AlwaysRebuild() &&
T == E->getTypeSourceInfo() &&
!ArgumentChanged)
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
// FIXME: we're faking the locations of the commas
return getDerived().RebuildCXXUnresolvedConstructExpr(T,
@@ -5901,7 +5901,7 @@
Qualifier == E->getQualifier() &&
NameInfo.getName() == E->getMember() &&
FirstQualifierInScope == E->getFirstQualifierFoundInScope())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildCXXDependentScopeMemberExpr(Base.get(),
BaseType,
@@ -6040,7 +6040,7 @@
return ExprError();
if (!getDerived().AlwaysRebuild() && SubExpr.get() == E->getOperand())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildCXXNoexceptExpr(E->getSourceRange(),SubExpr.get());
}
@@ -6048,7 +6048,7 @@
template<typename Derived>
ExprResult
TreeTransform<Derived>::TransformObjCStringLiteral(ObjCStringLiteral *E) {
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
template<typename Derived>
@@ -6061,7 +6061,7 @@
if (!getDerived().AlwaysRebuild() &&
EncodedTypeInfo == E->getEncodedTypeSourceInfo())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildObjCEncodeExpr(E->getAtLoc(),
EncodedTypeInfo,
@@ -6093,7 +6093,7 @@
// If nothing changed, just retain the existing message send.
if (!getDerived().AlwaysRebuild() &&
ReceiverTypeInfo == E->getClassReceiverTypeInfo() && !ArgChanged)
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
// Build a new class message send.
return getDerived().RebuildObjCMessageExpr(ReceiverTypeInfo,
@@ -6115,7 +6115,7 @@
// If nothing changed, just retain the existing message send.
if (!getDerived().AlwaysRebuild() &&
Receiver.get() == E->getInstanceReceiver() && !ArgChanged)
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
// Build a new instance message send.
return getDerived().RebuildObjCMessageExpr(Receiver.get(),
@@ -6129,13 +6129,13 @@
template<typename Derived>
ExprResult
TreeTransform<Derived>::TransformObjCSelectorExpr(ObjCSelectorExpr *E) {
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
template<typename Derived>
ExprResult
TreeTransform<Derived>::TransformObjCProtocolExpr(ObjCProtocolExpr *E) {
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
template<typename Derived>
@@ -6151,7 +6151,7 @@
// If nothing changed, just retain the existing expression.
if (!getDerived().AlwaysRebuild() &&
Base.get() == E->getBase())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildObjCIvarRefExpr(Base.get(), E->getDecl(),
E->getLocation(),
@@ -6164,7 +6164,7 @@
// 'super' never changes. Property never changes. Just retain the existing
// expression.
if (E->isSuperReceiver())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
// Transform the base expression.
ExprResult Base = getDerived().TransformExpr(E->getBase());
@@ -6176,7 +6176,7 @@
// If nothing changed, just retain the existing expression.
if (!getDerived().AlwaysRebuild() &&
Base.get() == E->getBase())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildObjCPropertyRefExpr(Base.get(), E->getProperty(),
E->getLocation());
@@ -6189,12 +6189,12 @@
// If this implicit setter/getter refers to super, it cannot have any
// dependent parts. Just retain the existing declaration.
if (E->isSuperReceiver())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
// If this implicit setter/getter refers to class methods, it cannot have any
// dependent parts. Just retain the existing declaration.
if (E->getInterfaceDecl())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
// Transform the base expression.
ExprResult Base = getDerived().TransformExpr(E->getBase());
@@ -6206,7 +6206,7 @@
// If nothing changed, just retain the existing expression.
if (!getDerived().AlwaysRebuild() &&
Base.get() == E->getBase())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildObjCImplicitSetterGetterRefExpr(
E->getGetterMethod(),
@@ -6231,7 +6231,7 @@
// If nothing changed, just retain the existing expression.
if (!getDerived().AlwaysRebuild() &&
Base.get() == E->getBase())
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildObjCIsaExpr(Base.get(), E->getIsaMemberLoc(),
E->isArrow());
@@ -6253,7 +6253,7 @@
if (!getDerived().AlwaysRebuild() &&
!ArgumentChanged)
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
return getDerived().RebuildShuffleVectorExpr(E->getBuiltinLoc(),
move_arg(SubExprs),
@@ -6328,7 +6328,7 @@
// FIXME: this is a bit instantiation-specific.
SemaRef.MarkDeclarationReferenced(E->getLocation(), ND);
- return SemaRef.Owned(E->Retain());
+ return SemaRef.Owned(E);
}
DeclarationNameInfo NameInfo(E->getDecl()->getDeclName(), E->getLocation());
Modified: cfe/trunk/lib/Serialization/ASTReaderStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderStmt.cpp?rev=117357&r1=117356&r2=117357&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReaderStmt.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReaderStmt.cpp Tue Oct 26 02:05:15 2010
@@ -274,9 +274,6 @@
else
S->setSwitchCaseList(SC);
- // Retain this SwitchCase, since SwitchStmt::addSwitchCase() would
- // normally retain it (but we aren't calling addSwitchCase).
- SC->Retain();
PrevSC = SC;
}
}
More information about the cfe-commits
mailing list