Skip to content

Commit 020ee66

Browse files
committed
C#: Remove unintended CP
1 parent 1ba9601 commit 020ee66

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -918,17 +918,13 @@ private Gvn::GvnType getANonTypeParameterSubTypeRestricted(RelevantGvnType t) {
918918

919919
/** A callable with an implicit `this` parameter. */
920920
private class InstanceCallable extends Callable {
921-
private Location l;
922-
923921
InstanceCallable() {
924922
not this.(Modifiable).isStatic() and
925923
// local functions and delegate capture `this` and should therefore
926924
// not have a `this` parameter
927925
not this instanceof LocalFunction and
928926
not this instanceof AnonymousFunctionExpr
929927
}
930-
931-
Location getARelevantLocation() { result = l }
932928
}
933929

934930
/**
@@ -1019,8 +1015,7 @@ private module Cached {
10191015
} or
10201016
TInstanceParameterNode(InstanceCallable c, Location l) {
10211017
c = any(DataFlowCallable dfc).asCallable(l) and
1022-
c instanceof CallableUsedInSource and
1023-
l = c.getARelevantLocation()
1018+
c instanceof CallableUsedInSource
10241019
} or
10251020
TDelegateSelfReferenceNode(Callable c) { lambdaCreationExpr(_, c) } or
10261021
TLocalFunctionCreationNode(ControlFlowNodes::ElementNode cfn, Boolean isPostUpdate) {

0 commit comments

Comments
 (0)