Query module ComparisonWithCancelingSubExpr
- Comparison with canceling sub-expression
- If the same sub-expression is added to both sides of a comparison, and there is no possibility of overflow or rounding, then the sub-expression is redundant and could be removed.
- readability maintainability
Provides the implementation of the BadAdditionOverflowCheck query. The query is implemented as a library, so that we can avoid producing duplicate results in other similar queries.
Provides the implementation of the PointlessSelfComparison query. The query is implemented as a library, so that we can avoid producing duplicate results in other similar queries.
Simple range analysis library. Range analysis is usually done as an abstract interpretation over the lattice of range values. (A range is a pair, containing a lower and upper bound for the value.) The problem with this approach is that the lattice is very tall, which means it can take an extremely large number of iterations to find the least fixed point. This example illustrates the problem:
Provides classes and predicates for working with C/C++/ObjC/ObjC++ code.