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

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

import semmle.code.cpp.ir.implementation.raw.internal.TranslatedExpr
predicate exprNeedsCopyIfNotLoaded(Expr expr)