Refactor: Simplify boolean conditional return statements in lib/Transforms/ObjCARC
authorAlexander Kornienko <alexfh@google.com>
Mon, 28 Dec 2015 16:19:08 +0000 (16:19 +0000)
committerAlexander Kornienko <alexfh@google.com>
Mon, 28 Dec 2015 16:19:08 +0000 (16:19 +0000)
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

index 2c3f295cabe6cfe491a03cea4c2e05da4bd337ff..f0ee6e2be48767051fd8a973a7bf0f8e6f0cb91e 100644 (file)
@@ -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