From 9aef4445a34dc182556ee84b4d446a5afe9daac0 Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Thu, 27 Feb 2014 13:13:59 +0000 Subject: [PATCH] [asan] fix a pair of silly typos git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202391 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Instrumentation/AddressSanitizer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp index e971e6783f9..27c97f25044 100644 --- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -673,7 +673,7 @@ static bool isInterestingPointerComparisonOrSubtraction(Instruction *I) { if (!Cmp->isRelational()) return false; } else if (BinaryOperator *BO = dyn_cast(I)) { - if (!BO->getOpcode() == Instruction::Sub) + if (BO->getOpcode() != Instruction::Sub) return false; } else { return false; @@ -1285,7 +1285,7 @@ bool AddressSanitizer::runOnFunction(Function &F) { if (!TempsToInstrument.insert(Addr)) continue; // We've seen this temp in the current BB. } - } else if (ClInstrumentAtomics && + } else if (ClInvalidPointerPairs && isInterestingPointerComparisonOrSubtraction(BI)) { PointerComparisonsOrSubtracts.push_back(BI); continue;