Index: lib/AST/ASTContext.cpp =================================================================== --- lib/AST/ASTContext.cpp +++ lib/AST/ASTContext.cpp @@ -6654,15 +6654,12 @@ // equivalent GCC vector types. const VectorType *First = FirstVec->getAs(); const VectorType *Second = SecondVec->getAs(); - if (First->getNumElements() == Second->getNumElements() && - hasSameType(First->getElementType(), Second->getElementType()) && - First->getVectorKind() != VectorType::AltiVecPixel && - First->getVectorKind() != VectorType::AltiVecBool && - Second->getVectorKind() != VectorType::AltiVecPixel && - Second->getVectorKind() != VectorType::AltiVecBool) - return true; - - return false; + return First->getNumElements() == Second->getNumElements() && + hasSameType(First->getElementType(), Second->getElementType()) && + First->getVectorKind() != VectorType::AltiVecPixel && + First->getVectorKind() != VectorType::AltiVecBool && + Second->getVectorKind() != VectorType::AltiVecPixel && + Second->getVectorKind() != VectorType::AltiVecBool; } //===----------------------------------------------------------------------===// @@ -7018,11 +7015,8 @@ // If either is an unqualified 'id' and the other is a block, it's // acceptable. - if ((lhsOPT && lhsOPT->isObjCIdType() && rhsBlock) || - (rhsOPT && rhsOPT->isObjCIdType() && lhsBlock)) - return true; - - return false; + return (lhsOPT && lhsOPT->isObjCIdType() && rhsBlock) || + (rhsOPT && rhsOPT->isObjCIdType() && lhsBlock); } // Check that the given Objective-C type argument lists are equivalent. @@ -8428,12 +8422,10 @@ // static, static inline, always_inline, and extern inline functions can // always be deferred. Normal inline functions can be deferred in C99/C++. // Implicit template instantiations can also be deferred in C++. - if (Linkage == GVA_Internal || Linkage == GVA_AvailableExternally || - Linkage == GVA_DiscardableODR) - return false; - return true; + return !(Linkage == GVA_Internal || Linkage == GVA_AvailableExternally || + Linkage == GVA_DiscardableODR); } - + const VarDecl *VD = cast(D); assert(VD->isFileVarDecl() && "Expected file scoped var"); Index: lib/AST/ASTDiagnostic.cpp =================================================================== --- lib/AST/ASTDiagnostic.cpp +++ lib/AST/ASTDiagnostic.cpp @@ -1032,11 +1032,7 @@ return false; } - if (!Default->getType()->isReferenceType()) { - return true; - } - - return false; + return !Default->getType()->isReferenceType(); } /// DiffNonTypes - Handles any template parameters not handled by DiffTypes Index: lib/AST/Decl.cpp =================================================================== --- lib/AST/Decl.cpp +++ lib/AST/Decl.cpp @@ -2377,9 +2377,7 @@ return false; } - if (isa(S) && cast(S)->body_empty()) - return true; - return false; + return isa(S) && cast(S)->body_empty(); } bool FunctionDecl::isDefined(const FunctionDecl *&Definition) const { @@ -2737,10 +2735,7 @@ if (Redecl->isImplicit()) return false; - if (!Redecl->isInlineSpecified() || Redecl->getStorageClass() == SC_Extern) - return true; // Not an inline definition - - return false; + return !Redecl->isInlineSpecified() || Redecl->getStorageClass() == SC_Extern; } /// \brief For a function declaration in C or C++, determine whether this Index: lib/AST/DeclCXX.cpp =================================================================== --- lib/AST/DeclCXX.cpp +++ lib/AST/DeclCXX.cpp @@ -1861,10 +1861,7 @@ // Is it the same as our our class type? CanQualType ClassTy = Context.getCanonicalType(Context.getTagDeclType(getParent())); - if (ParamType.getUnqualifiedType() != ClassTy) - return false; - - return true; + return ParamType.getUnqualifiedType() == ClassTy; } const CXXConstructorDecl *CXXConstructorDecl::getInheritedConstructor() const { Index: lib/AST/Expr.cpp =================================================================== --- lib/AST/Expr.cpp +++ lib/AST/Expr.cpp @@ -3429,10 +3429,7 @@ if (const ArraySubscriptExpr *ASE = dyn_cast(E)) return ASE->getBase()->getType()->isVectorType(); - if (isa(E)) - return true; - - return false; + return isa(E); } bool Expr::refersToGlobalRegisterVar() const { Index: lib/AST/ExprConstant.cpp =================================================================== --- lib/AST/ExprConstant.cpp +++ lib/AST/ExprConstant.cpp @@ -6962,10 +6962,7 @@ assert(E->getLHS()->getType()->isIntegralOrEnumerationType() && E->getRHS()->getType()->isIntegralOrEnumerationType()); - if (LHSResult.Failed && !Info.keepEvaluatingAfterFailure()) - return false; // Ignore RHS; - - return true; + return !(LHSResult.Failed && !Info.keepEvaluatingAfterFailure()); } bool DataRecursiveIntBinOpEvaluator:: Index: lib/AST/Type.cpp =================================================================== --- lib/AST/Type.cpp +++ lib/AST/Type.cpp @@ -1918,9 +1918,7 @@ // CXXRecordDecl, use that one. RD = RD->getMostRecentDecl(); // Nothing interesting to do if the inheritance attribute is already set. - if (RD->hasAttr()) - return false; - return true; + return !RD->hasAttr(); } case ObjCObject: return cast(CanonicalType)->getBaseType() @@ -2311,13 +2309,11 @@ // Enumerated types are promotable to their compatible integer types // (C99 6.3.1.1) a.k.a. its underlying type (C++ [conv.prom]p2). if (const EnumType *ET = getAs()){ - if (this->isDependentType() || ET->getDecl()->getPromotionType().isNull() - || ET->getDecl()->isScoped()) - return false; - - return true; + return !(this->isDependentType() || + ET->getDecl()->getPromotionType().isNull() || + ET->getDecl()->isScoped()); } - + return false; }