xazax.hun added inline comments.
================
Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:500
+ // If the type of A - B is the same as the type of A, then use the type
of
+ // B as the type of B - A. Otherwise keep the type of A - B.
+ SymbolRef negSym = SymMgr.getSymSymExpr(SSE->getRHS(), BO_Sub,
----------------
Could you give an example why do you need this (probably as a test), or
constrain the transformation when all the types are the same?
================
Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:507
+ State->get<ConstraintRange>(negSym)) {
+ // Do not negate an unsigned range set, unless it is [0, 0].
+ if((negV->getConcreteValue() &&
----------------
I think it would be better to describe why don't we want to do that rather than
describing what the code does.
https://reviews.llvm.org/D35110
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits