From: Adam Balogh Date: Tue, 23 Apr 2019 07:45:10 +0000 (+0000) Subject: [Analyzer] Fix for previous commit X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb72871e0572587b9ab80c8abbb2845888f6b651;p=clang [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358955 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp b/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp index d0d304cc5e..e35bc2768a 100644 --- a/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp +++ b/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());