diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-09-17 06:31:17 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-17 06:31:17 +0000 |
commit | 7e88a60d38b36695520e4f8d9279766ef111a662 (patch) | |
tree | a83b0c89d685d04b973515f36a3da83ca6ed41eb | |
parent | aa14a1b949fafc1263d9d28ee2e3496aabb831ef (diff) |
Remove trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82128 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AST/Expr.cpp | 18 | ||||
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 15 |
2 files changed, 16 insertions, 17 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 4f2d47ec2f..5682eb6dd5 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -1069,14 +1069,14 @@ Expr::isModifiableLvalue(ASTContext &Ctx, SourceLocation *Loc) const { if (!BDR->isByRef() && isa<VarDecl>(BDR->getDecl())) return MLV_NotBlockQualified; } - + // Assigning to an 'implicit' property? - if (const ObjCImplicitSetterGetterRefExpr* Expr = + if (const ObjCImplicitSetterGetterRefExpr* Expr = dyn_cast<ObjCImplicitSetterGetterRefExpr>(this)) { if (Expr->getSetterMethod() == 0) return MLV_NoSetterProperty; } - + QualType CT = Ctx.getCanonicalType(getType()); if (CT.isConstQualified()) @@ -1119,7 +1119,7 @@ bool Expr::isOBJCGCCandidate(ASTContext &Ctx) const { QualType T = VD->getType(); // dereferencing to a pointer is always a gc'able candidate, // unless it is __weak. - return T->isPointerType() && + return T->isPointerType() && (Ctx.getObjCGCAttrKind(T) != QualType::Weak); } return false; @@ -1371,11 +1371,11 @@ static ICEDiag CheckICE(const Expr* E, ASTContext &Ctx) { case Expr::NoStmtClass: case Expr::ExprClass: return ICEDiag(2, E->getLocStart()); - + case Expr::GNUNullExprClass: // GCC considers the GNU __null value to be an integral constant expression. return NoDiag(); - + case Expr::ParenExprClass: return CheckICE(cast<ParenExpr>(E)->getSubExpr(), Ctx); case Expr::IntegerLiteralClass: @@ -1431,7 +1431,7 @@ static ICEDiag CheckICE(const Expr* E, ASTContext &Ctx) { case UnaryOperator::AddrOf: case UnaryOperator::Deref: return ICEDiag(2, E->getLocStart()); - + case UnaryOperator::Extension: case UnaryOperator::LNot: case UnaryOperator::Plus: @@ -1473,7 +1473,7 @@ static ICEDiag CheckICE(const Expr* E, ASTContext &Ctx) { case BinaryOperator::XorAssign: case BinaryOperator::OrAssign: return ICEDiag(2, E->getLocStart()); - + case BinaryOperator::Mul: case BinaryOperator::Div: case BinaryOperator::Rem: @@ -1601,7 +1601,7 @@ static ICEDiag CheckICE(const Expr* E, ASTContext &Ctx) { return CheckICE(cast<ChooseExpr>(E)->getChosenSubExpr(Ctx), Ctx); } } - + // Silence a GCC warning return ICEDiag(2, E->getLocStart()); } diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 4b5173ffb2..7b23486d5f 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -1002,7 +1002,7 @@ Sema::BuildDeclarationNameExpr(SourceLocation Loc, NamedDecl *D, MarkDeclarationReferenced(Loc, D); if (PerformObjectMemberConversion(This, D)) return ExprError(); - + bool ShouldCheckUse = true; if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D)) { // Don't diagnose the use of a virtual member function unless it's @@ -1010,7 +1010,7 @@ Sema::BuildDeclarationNameExpr(SourceLocation Loc, NamedDecl *D, if (MD->isVirtual() && (!SS || !SS->isSet())) ShouldCheckUse = false; } - + if (ShouldCheckUse && DiagnoseUseOfDecl(D, Loc)) return ExprError(); return Owned(BuildMemberExpr(Context, This, true, SS, D, @@ -1809,7 +1809,7 @@ Sema::ActOnArraySubscriptExpr(Scope *S, ExprArg Base, SourceLocation LLoc, return ExprError(Diag(LLoc, diag::err_typecheck_subscript_not_integer) << IndexExpr->getSourceRange()); - if ((IndexExpr->getType()->isSpecificBuiltinType(BuiltinType::Char_S) || + if ((IndexExpr->getType()->isSpecificBuiltinType(BuiltinType::Char_S) || IndexExpr->getType()->isSpecificBuiltinType(BuiltinType::Char_U)) && !IndexExpr->isTypeDependent()) Diag(LLoc, diag::warn_subscript_is_char) << IndexExpr->getSourceRange(); @@ -2168,7 +2168,7 @@ Sema::BuildMemberReferenceExpr(Scope *S, ExprArg Base, SourceLocation OpLoc, if (MD->isVirtual() && (!SS || !SS->isSet())) ShouldCheckUse = false; } - + // Check the use of this field if (ShouldCheckUse && DiagnoseUseOfDecl(MemberDecl, MemberLoc)) return ExprError(); @@ -3204,12 +3204,12 @@ Sema::ActOnCastExpr(Scope *S, SourceLocation LParenLoc, TypeTy *Ty, return ExprError(); if (Method) { - OwningExprResult CastArg = BuildCXXCastArgument(LParenLoc, castType, Kind, + OwningExprResult CastArg = BuildCXXCastArgument(LParenLoc, castType, Kind, Method, move(Op)); - + if (CastArg.isInvalid()) return ExprError(); - + castExpr = CastArg.takeAs<Expr>(); } else { Op.release(); @@ -6143,4 +6143,3 @@ void Sema::MarkDeclarationReferenced(SourceLocation Loc, Decl *D) { return; } } - |