r358955 - [Analyzer] Fix for previous commit
Adam Balogh via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 23 00:45:11 PDT 2019
Author: baloghadamsoftware
Date: Tue Apr 23 00:45:10 2019
New Revision: 358955
URL: http://llvm.org/viewvc/llvm-project?rev=358955&view=rev
Log:
[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.
Modified:
cfe/trunk/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp?rev=358955&r1=358954&r2=358955&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp Tue Apr 23 00:45:10 2019
@@ -848,9 +848,9 @@ void IteratorChecker::processComparison(
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());
More information about the cfe-commits
mailing list