From 8f8827014d6e095d0d7f1002fdec30fe47a6d7a3 Mon Sep 17 00:00:00 2001 From: Adam Balogh Date: Tue, 23 Apr 2019 07:45:10 +0000 Subject: [PATCH] [Analyzer] Fix for previous commit A compilation warning was in my previous commit which broke the buildbot because it is using `-Werror` for compilation. This patch fixes this issue. llvm-svn: 358955 --- clang/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp index d0d304c..e35bc27 100644 --- a/clang/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp @@ -848,9 +848,9 @@ void IteratorChecker::processComparison(CheckerContext &C, SymbolRef Sym2, const SVal &RetVal, OverloadedOperatorKind Op) const { if (const auto TruthVal = RetVal.getAs()) { - if (State = relateSymbols(State, Sym1, Sym2, + if ((State = relateSymbols(State, Sym1, Sym2, (Op == OO_EqualEqual) == - (TruthVal->getValue() != 0))) { + (TruthVal->getValue() != 0)))) { C.addTransition(State); } else { C.generateSink(State, C.getPredecessor()); -- 2.7.4