[llvm] r251318 - Refactor: Simplify boolean conditional return statements in lib/Transforms/Instrumentation
Alexey Samsonov via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 26 11:06:40 PDT 2015
Author: samsonov
Date: Mon Oct 26 13:06:40 2015
New Revision: 251318
URL: http://llvm.org/viewvc/llvm-project?rev=251318&view=rev
Log:
Refactor: Simplify boolean conditional return statements in lib/Transforms/Instrumentation
Summary: Use clang-tidy to simplify boolean conditional return statements.
Differential Revision: http://reviews.llvm.org/D9996
Patch by Richard (legalize at xmission.com)!
Modified:
llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=251318&r1=251317&r2=251318&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Mon Oct 26 13:06:40 2015
@@ -908,10 +908,8 @@ static bool isInterestingPointerComparis
} 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) {
More information about the llvm-commits
mailing list