From 52819432c0deb30efb9e33f9027b207f2fea76bd Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Tue, 3 Sep 2024 17:18:18 +0200 Subject: [PATCH] C++: Address review comment --- cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll b/cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll index 78c64e222824..91b57049a54e 100644 --- a/cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll +++ b/cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll @@ -727,7 +727,9 @@ class C11GenericExpr extends Conversion, @c11_generic { * ``` * this holds for 0. */ - predicate isSelectedAssociation(int n) { this.getAssociationExpr(n) instanceof ReuseExpr } + predicate isSelectedAssociation(int n) { + this.getAssociationExpr(n).(ReuseExpr).getReusedExpr() = this.getExpr() + } } /**