We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9762313 commit 86e7919Copy full SHA for 86e7919
cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll
@@ -143,11 +143,10 @@ private newtype TDefOrUseImpl =
143
private predicate isGlobalUse(
144
GlobalLikeVariable v, IRFunction f, int indirection, int indirectionIndex
145
) {
146
- exists(VariableAddressInstruction vai, int defIndex |
+ exists(VariableAddressInstruction vai |
147
vai.getEnclosingIRFunction() = f and
148
vai.getAstVariable() = v and
149
- isDef(_, _, _, vai, indirection, defIndex) and
150
- indirectionIndex = [0 .. defIndex] + 1
+ isDef(_, _, _, vai, indirection, indirectionIndex)
151
)
152
}
153
@@ -158,7 +157,7 @@ private predicate isGlobalDefImpl(
158
157
159
160
isUse(_, _, vai, indirection, indirectionIndex) and
161
- not isDef(_, _, vai.getAUse(), _, _, _)
+ not isDef(_, _, _, vai, _, indirectionIndex)
162
163
164
0 commit comments