NoQ accepted this revision. NoQ added a comment. Yep, nice and clean~
================ Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:520 + Result = applyBitwiseConstraints(BV, F, T, Result, Sym); return Result; ---------------- That's more and more "special case"s, i guess we'd have to make them legal. The `getRange()` function is not only a simple wrapper around `State->get<>()`, but it is also the single source of truth regarding constraints that can be assumed about the values by simply looking at the values, without exploring the program state. I think this should be reflected in the comments. ================ Comment at: test/Analysis/constant-folding.c:92 + clang_analyzer_eval((b | 1) > 0); // expected-warning{{UNKNOWN}} + clang_analyzer_eval((b | 1) == 0); // expected-warning{{UNKNOWN}} + ---------------- Can we still assume that `b | 1` is non-zero? Maybe FIXME here? https://reviews.llvm.org/D39707 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits