Query module BadCheckOdd

name
Bad check for oddness
description
Using “x % 2 == 1” to check whether x is odd does not work for negative numbers.
kind
problem
problem.severity
warning
precision
medium
id
cpp/incomplete-parity-check
tags
reliability correctness types

Imports

cpp

Provides classes and predicates for working with C/C++/ObjC/ObjC++ code.