Skip to content

Commit

Permalink
Refactor: Simplify boolean conditional return statements in lib/Trans…
Browse files Browse the repository at this point in the history
…forms/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
  • Loading branch information
alexfh committed Dec 28, 2015
1 parent 0062f39 commit 7e27586
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/Transforms/ObjCARC/ObjCARCOpts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e27586

Please sign in to comment.