Skip to content

Commit 36221fe

Browse files
authored
Merge pull request github#3334 from MathiasVP/get-an-assigned-value-join-order
C++: Fix join order in getAnAssignedValue
2 parents 12f264c + b1a94d8 commit 36221fe

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cpp/ql/src/semmle/code/cpp/Variable.qll

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,7 @@ class Variable extends Declaration, @variable {
126126
or
127127
exists(AssignExpr ae | ae.getLValue().(Access).getTarget() = this and result = ae.getRValue())
128128
or
129-
exists(AggregateLiteral l |
130-
this.getDeclaringType() = l.getType() and
131-
result = l.getChild(this.(Field).getInitializationOrder())
132-
)
129+
exists(ClassAggregateLiteral l | result = l.getFieldExpr(this))
133130
}
134131

135132
/**

0 commit comments

Comments
 (0)