CodeQL library for C/C++

Predicate exprNeedsCopyIfNotLoaded

Holds if the translation of expr will not directly generate any Instruction for use as result. For such instructions we can synthesize a CopyValue instruction to ensure that there is a 1-to-1 mapping between expressions and result-bearing instructions.

Import path

predicate exprNeedsCopyIfNotLoaded(Expr expr)