diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/SideEffects.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/SideEffects.qll index 0ce1f898c0d..c6214bf5e4f 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/SideEffects.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/SideEffects.qll @@ -135,8 +135,8 @@ private predicate hasDefaultSideEffect(Call call, ParameterIndex i, boolean buff * All kinds of expressions invoke a function as part of their evaluation. This class provides a * way to treat those expressions similarly, and to get the invoked `Declaration`. */ -class ExprWithCallSizeEffects extends Expr { - ExprWithCallSizeEffects() { +class ExprWithCallSideEffects extends Expr { + ExprWithCallSideEffects() { this instanceof Call or this instanceof NewOrNewArrayExpr @@ -162,7 +162,7 @@ class ExprWithCallSizeEffects extends Expr { * Returns the side effect opcode, if any, that represents any side effects not specifically modeled * by an argument side effect. */ -Opcode getCallSideEffectOpcode(ExprWithCallSizeEffects expr) { +Opcode getCallSideEffectOpcode(ExprWithCallSideEffects expr) { not exists(expr.getTarget().(SideEffectFunction)) and result instanceof Opcode::CallSideEffect or exists(SideEffectFunction sideEffectFunction | diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll index 2f86a3f476b..58456476f6a 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll @@ -879,7 +879,7 @@ newtype TTranslatedElement = // The declaration/initialization part of a `ConditionDeclExpr` TTranslatedConditionDecl(ConditionDeclExpr expr) { not ignoreExpr(expr) } or // The side effects of a `Call` - TTranslatedCallSideEffects(ExprWithCallSizeEffects expr) { + TTranslatedCallSideEffects(ExprWithCallSideEffects expr) { not ignoreExpr(expr) and not ignoreSideEffects(expr) } or @@ -918,7 +918,7 @@ newtype TTranslatedElement = } or // Constructor calls lack a qualifier (`this`) expression, so we need to handle the side effects // on `*this` without an `Expr`. - TTranslatedImplicitThisQualifierSideEffect(ExprWithCallSizeEffects call, SideEffectOpcode opcode) { + TTranslatedImplicitThisQualifierSideEffect(ExprWithCallSideEffects call, SideEffectOpcode opcode) { not ignoreExpr(call) and not ignoreSideEffects(call) and (