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/Instrumentation

Summary: Use clang-tidy to simplify boolean conditional return statements.

Differential Revision: http://reviews.llvm.org/D9996

Patch by Richard ([email protected])!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251318 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
vonosmas committed Oct 26, 2015
1 parent 2d382f2 commit 0d3cc55
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/Transforms/Instrumentation/AddressSanitizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,10 +908,8 @@ static bool isInterestingPointerComparisonOrSubtraction(Instruction *I) {
} else {
return false;
}
if (!isPointerOperand(I->getOperand(0)) ||
!isPointerOperand(I->getOperand(1)))
return false;
return true;
return isPointerOperand(I->getOperand(0)) &&
isPointerOperand(I->getOperand(1));
}

bool AddressSanitizer::GlobalIsLinkerInitialized(GlobalVariable *G) {
Expand Down

0 comments on commit 0d3cc55

Please sign in to comment.