Skip to content

Commit 27dc49f

Browse files
author
Robert Marsh
committed
C++: Fix performance issue in PartialDefinition
1 parent 9240256 commit 27dc49f

File tree

1 file changed

+2
-2
lines changed
  • cpp/ql/src/semmle/code/cpp/dataflow/internal

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ private module PartialDefinitions {
112112
abstract class PartialDefinition extends Expr {
113113
ControlFlowNode node;
114114

115-
PartialDefinition() { not this instanceof Conversion }
116-
117115
abstract deprecated predicate partiallyDefines(Variable v);
118116

119117
abstract deprecated predicate partiallyDefinesThis(ThisExpr e);
@@ -161,6 +159,7 @@ private module PartialDefinitions {
161159

162160
IteratorPartialDefinition() {
163161
exists(Expr convertedInner |
162+
not this instanceof Conversion and
164163
valueToUpdate(convertedInner, this.getFullyConverted(), node) and
165164
innerDefinedExpr = convertedInner.getUnconverted() and
166165
(
@@ -212,6 +211,7 @@ private module PartialDefinitions {
212211
Expr innerDefinedExpr;
213212

214213
VariablePartialDefinition() {
214+
not this instanceof Conversion and
215215
exists(Expr convertedInner |
216216
valueToUpdate(convertedInner, this.getFullyConverted(), node) and
217217
innerDefinedExpr = convertedInner.getUnconverted()

0 commit comments

Comments
 (0)