ASDenysPetrov added a comment. @vsavchenko
================ Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:2797-2799 +ProgramStateRef +RangeConstraintManager::updateExistingConstraints(ProgramStateRef State, + SymbolRef Sym, RangeSet R) { ---------------- ASDenysPetrov wrote: > vsavchenko wrote: > > OK, but I still don't understand one thing. > > Here you go over all "smaller" types and artificially create constraints > > for them, and at the same time in `VisitSymbolCast` you do the opposite > > operation? Why? Shouldn't the map have constraints for smaller types > > already because of this action? Why do we need to do both? > > > I've been preparing an answer for you, but suddenly you inspired me on some > impovements. Thanks. I've fixed `RangeConstraintManager::updateExistingConstraints`. There was a mistake when I update smaller types from the **root** symbol, but correct symbol is the **given** symbol which is before calling `ignoreCast()`. May be now it would be more clear for you. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103096/new/ https://reviews.llvm.org/D103096 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits