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

llvm-svn: 256502
  • Loading branch information
alexfh committed Dec 28, 2015
1 parent ad8a104 commit d0af3b3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
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 d0af3b3

Please sign in to comment.