Query module NoBooleanSideEffects
- Side effect in a Boolean expression
- The evaluation of a Boolean expression shall have no side effects.
Provides classes and predicates for working with C/C++/ObjC/ObjC++ code.
Gets a “pointer type” contained in the given type. This traverses typedefs and derived types, including types of struct or union members, returning each “pointer to X” type encountered on that traversal.
A function is “inherently unsafe” for side effects if it writes a global or static variable, or if it calls another inherently unsafe function.
A whitelist of functions that should be considered side-effect free.
Find functions that are “safe to call” without causing a side effect. Being safe to call means that any “pointer type” in an argument type actually refers to a “const” object, and, moreover, the function is not inherently unsafe.
A “Boolean expression” is an expression forbidden from having side effects by this rule.