Skip to content

Commit fef6770

Browse files
committed
C#: Remove the callableFlow for the Add method in subtypes of System.Collections.IEnumerable.
1 parent 51e3c58 commit fef6770

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

csharp/ql/lib/semmle/code/csharp/dataflow/LibraryTypeDataFlow.qll

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -478,25 +478,6 @@ class SystemTextStringBuilderFlow extends LibraryTypeDataFlow, SystemTextStringB
478478
class IEnumerableFlow extends LibraryTypeDataFlow, RefType {
479479
IEnumerableFlow() { this.getABaseType*() instanceof SystemCollectionsIEnumerableInterface }
480480

481-
override predicate callableFlow(
482-
CallableFlowSource source, AccessPath sourceAp, CallableFlowSink sink, AccessPath sinkAp,
483-
SourceDeclarationCallable c, boolean preservesValue
484-
) {
485-
preservesValue = true and
486-
exists(string name, int arity |
487-
arity = c.getNumberOfParameters() and
488-
c = this.getAMethod() and
489-
c.getUndecoratedName() = name
490-
|
491-
name = "Add" and
492-
arity = 1 and
493-
source = TCallableFlowSourceArg(0) and
494-
sourceAp = AccessPath::empty() and
495-
sink instanceof CallableFlowSinkQualifier and
496-
sinkAp = AccessPath::element()
497-
)
498-
}
499-
500481
override predicate clearsContent(
501482
CallableFlowSource source, Content content, SourceDeclarationCallable callable
502483
) {

0 commit comments

Comments
 (0)