diff options
| author | John McCall <rjmccall@apple.com> | 2010-08-25 11:45:40 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-08-25 11:45:40 +0000 |
| commit | e302792b6155bb195f88610a1ebde38343cf402e (patch) | |
| tree | a3dc32bec0d52b683d794838266f40a1e43cffd7 /clang/lib/Sema/SemaDeclCXX.cpp | |
| parent | 1bcddcaab3d1ad8c24e1771ac58a480aeac4230d (diff) | |
| download | bcm5719-llvm-e302792b6155bb195f88610a1ebde38343cf402e.tar.gz bcm5719-llvm-e302792b6155bb195f88610a1ebde38343cf402e.zip | |
GCC didn't care for my attempt at API compatibility, so brute-force everything
to the new constants.
llvm-svn: 112047
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index dbf22eba500..6a09a75ddc8 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -1539,7 +1539,7 @@ BuildImplicitBaseInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor, CXXCastPath BasePath; BasePath.push_back(BaseSpec); SemaRef.ImpCastExprToType(CopyCtorArg, ArgTy, - CastExpr::CK_UncheckedDerivedToBase, + CK_UncheckedDerivedToBase, VK_LValue, &BasePath); InitializationKind InitKind @@ -4636,10 +4636,7 @@ BuildSingleCopyAssign(Sema &S, SourceLocation Loc, QualType T, // operator is used. const ConstantArrayType *ArrayTy = S.Context.getAsConstantArrayType(T); if (!ArrayTy) { - ExprResult Assignment = S.CreateBuiltinBinOp(Loc, - BinaryOperator::Assign, - To, - From); + ExprResult Assignment = S.CreateBuiltinBinOp(Loc, BO_Assign, To, From); if (Assignment.isInvalid()) return S.StmtError(); @@ -4688,12 +4685,12 @@ BuildSingleCopyAssign(Sema &S, SourceLocation Loc, QualType T, Expr *Comparison = new (S.Context) BinaryOperator(IterationVarRef->Retain(), new (S.Context) IntegerLiteral(Upper, SizeType, Loc), - BinaryOperator::NE, S.Context.BoolTy, Loc); + BO_NE, S.Context.BoolTy, Loc); // Create the pre-increment of the iteration variable. Expr *Increment = new (S.Context) UnaryOperator(IterationVarRef->Retain(), - UnaryOperator::PreInc, + UO_PreInc, SizeType, Loc); // Subscript the "from" and "to" expressions with the iteration variable. @@ -5085,8 +5082,8 @@ void Sema::DefineImplicitCopyAssignment(SourceLocation CurrentLocation, } // Take the address of the field references for "from" and "to". - From = CreateBuiltinUnaryOp(Loc, UnaryOperator::AddrOf, From.get()); - To = CreateBuiltinUnaryOp(Loc, UnaryOperator::AddrOf, To.get()); + From = CreateBuiltinUnaryOp(Loc, UO_AddrOf, From.get()); + To = CreateBuiltinUnaryOp(Loc, UO_AddrOf, To.get()); bool NeedsCollectableMemCpy = (BaseType->isRecordType() && @@ -5175,8 +5172,7 @@ void Sema::DefineImplicitCopyAssignment(SourceLocation CurrentLocation, if (!Invalid) { // Add a "return *this;" - ExprResult ThisObj = CreateBuiltinUnaryOp(Loc, UnaryOperator::Deref, - This); + ExprResult ThisObj = CreateBuiltinUnaryOp(Loc, UO_Deref, This); StmtResult Return = ActOnReturnStmt(Loc, ThisObj.get()); if (Return.isInvalid()) |

