Skip to content

Commit 9cf8199

Browse files
authored
Merge pull request #2383 from jbj/field-isStatic
C++: Don't check if a Field is static
2 parents 51a51d7 + fbf2ef8 commit 9cf8199

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowPrivate.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ predicate storeStep(Node node1, Content f, PostUpdateNode node2) {
219219
node1.asExpr() = a and
220220
a.getLValue() = fa
221221
) and
222-
not fa.getTarget().isStatic() and
223222
node2.getPreUpdateNode().asExpr() = fa.getQualifier() and
224223
f.(FieldContent).getField() = fa.getTarget()
225224
)

cpp/ql/src/semmle/code/cpp/dataflow/internal/FlowVar.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ private module PartialDefinitions {
133133
TReferenceArgument(Expr arg, VariableAccess va) { referenceArgument(va, arg) }
134134

135135
private predicate isInstanceFieldWrite(FieldAccess fa, ControlFlowNode node) {
136-
not fa.getTarget().isStatic() and
137-
assignmentLikeOperation(node, fa.getTarget(), fa, _)
136+
assignmentLikeOperation(node, _, fa, _)
138137
}
139138

140139
class PartialDefinition extends TPartialDefinition {

0 commit comments

Comments
 (0)