[Analyzer] Fix for previous commit
authorAdam Balogh <adam.balogh@ericsson.com>
Tue, 23 Apr 2019 07:45:10 +0000 (07:45 +0000)
committerAdam Balogh <adam.balogh@ericsson.com>
Tue, 23 Apr 2019 07:45:10 +0000 (07:45 +0000)
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

index d0d304c..e35bc27 100644 (file)
@@ -848,9 +848,9 @@ void IteratorChecker::processComparison(CheckerContext &C,
                                         SymbolRef Sym2, const SVal &RetVal,
                                         OverloadedOperatorKind Op) const {
   if (const auto TruthVal = RetVal.getAs<nonloc::ConcreteInt>()) {
-    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());