From 7e27586371475fe358962e06c2d5ac4c8a9b3016 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Mon, 28 Dec 2015 16:19:08 +0000 Subject: [PATCH] Refactor: Simplify boolean conditional return statements in lib/Transforms/ObjCARC Summary: Use clang-tidy to simplify boolean conditional return statements Reviewers: craig.topper, bkramer, chandlerc, gottesmm Subscribers: llvm-commits Patch by Richard Thomson! Differential Revision: http://reviews.llvm.org/D9999 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256502 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/ObjCARC/ObjCARCOpts.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/Transforms/ObjCARC/ObjCARCOpts.cpp b/lib/Transforms/ObjCARC/ObjCARCOpts.cpp index 2c3f295cabe..f0ee6e2be48 100644 --- a/lib/Transforms/ObjCARC/ObjCARCOpts.cpp +++ b/lib/Transforms/ObjCARC/ObjCARCOpts.cpp @@ -2010,10 +2010,7 @@ HasSafePathToPredecessorCall(const Value *Arg, Instruction *Retain, // Check that the call is a regular call. ARCInstKind Class = GetBasicARCInstKind(Call); - if (Class != ARCInstKind::CallOrUser && Class != ARCInstKind::Call) - return false; - - return true; + return Class == ARCInstKind::CallOrUser || Class == ARCInstKind::Call; } /// Find a dependent retain that precedes the given autorelease for which there -- 2.34.1