CodeQL library for C/C++
codeql/cpp-all 0.12.8-dev (changelog, source)
Search

Member predicate BinaryOperation::mayBeGloballyImpure

Holds if it is possible that the expression may be impure. If we are not sure, then it holds. Unlike mayBeImpure(), this predicate does not consider modifications to temporary local variables to be impure. If you call a function in which nothing may be globally impure then the function as a whole will have no side-effects, even if it mutates its own fresh stack variables.

predicate mayBeGloballyImpure()