From c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 2 Aug 2018 17:33:11 +0000 Subject: Vendor import of clang trunk r338536: https://llvm.org/svn/llvm-project/cfe/trunk@338536 --- lib/ARCMigrate/TransZeroOutPropsInDealloc.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/ARCMigrate/TransZeroOutPropsInDealloc.cpp') diff --git a/lib/ARCMigrate/TransZeroOutPropsInDealloc.cpp b/lib/ARCMigrate/TransZeroOutPropsInDealloc.cpp index 76ce0ec90db3..220102ec49ce 100644 --- a/lib/ARCMigrate/TransZeroOutPropsInDealloc.cpp +++ b/lib/ARCMigrate/TransZeroOutPropsInDealloc.cpp @@ -56,7 +56,7 @@ public: bool BackedBySynthesizeSetter = false; for (llvm::DenseMap::iterator - P = SynthesizedProperties.begin(), + P = SynthesizedProperties.begin(), E = SynthesizedProperties.end(); P != E; ++P) { ObjCPropertyDecl *PropDecl = P->first; if (PropDecl->getSetterName() == ME->getSelector()) { @@ -66,11 +66,11 @@ public: } if (!BackedBySynthesizeSetter) return true; - + // Remove the setter message if RHS is null Transaction Trans(TA); Expr *RHS = ME->getArg(0); - bool RHSIsNull = + bool RHSIsNull = RHS->isNullPointerConstant(Ctx, Expr::NPC_ValueDependentIsNull); if (RHSIsNull && isRemovable(ME)) @@ -119,10 +119,10 @@ public: ObjCPropertyDecl *PD = PID->getPropertyDecl(); ObjCMethodDecl *setterM = PD->getSetterMethodDecl(); if (!(setterM && setterM->isDefined())) { - ObjCPropertyDecl::PropertyAttributeKind AttrKind = + ObjCPropertyDecl::PropertyAttributeKind AttrKind = PD->getPropertyAttributes(); - if (AttrKind & - (ObjCPropertyDecl::OBJC_PR_retain | + if (AttrKind & + (ObjCPropertyDecl::OBJC_PR_retain | ObjCPropertyDecl::OBJC_PR_copy | ObjCPropertyDecl::OBJC_PR_strong)) SynthesizedProperties[PD] = PID; @@ -173,7 +173,7 @@ private: return false; bool IvarBacksPropertySynthesis = false; for (llvm::DenseMap::iterator - P = SynthesizedProperties.begin(), + P = SynthesizedProperties.begin(), E = SynthesizedProperties.end(); P != E; ++P) { ObjCPropertyImplDecl *PropImpDecl = P->second; if (PropImpDecl && PropImpDecl->getPropertyIvarDecl() == IVDecl) { -- cgit v1.2.3