[asan] fix a pair of silly typos
[oota-llvm.git] / lib / Transforms / Instrumentation / AddressSanitizer.cpp
index e971e6783f90283c303a240f6391ac20ec79ffa8..27c97f25044a8dac5ebad520665a01ab5c689dd8 100644 (file)
@@ -673,7 +673,7 @@ static bool isInterestingPointerComparisonOrSubtraction(Instruction *I) {
     if (!Cmp->isRelational())
       return false;
   } else if (BinaryOperator *BO = dyn_cast<BinaryOperator>(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;