Apply clang-tidy's modernize-loop-convert to most of lib/Transforms.
Only minor manual fixes. No functionality change intended. llvm-svn: 273808
This commit is contained in:
@@ -1010,9 +1010,9 @@ void AddressSanitizer::instrumentPointerComparisonOrSubtraction(
|
||||
IRBuilder<> IRB(I);
|
||||
Function *F = isa<ICmpInst>(I) ? AsanPtrCmpFunction : AsanPtrSubFunction;
|
||||
Value *Param[2] = {I->getOperand(0), I->getOperand(1)};
|
||||
for (int i = 0; i < 2; i++) {
|
||||
if (Param[i]->getType()->isPointerTy())
|
||||
Param[i] = IRB.CreatePointerCast(Param[i], IntptrTy);
|
||||
for (Value *&i : Param) {
|
||||
if (i->getType()->isPointerTy())
|
||||
i = IRB.CreatePointerCast(i, IntptrTy);
|
||||
}
|
||||
IRB.CreateCall(F, Param);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user