Skip to content

Commit 6180970

Browse files
committed
C#: Address review comments.
1 parent c79c9dd commit 6180970

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

csharp/ql/src/utils/model-generator/internal/CaptureModelsSpecific.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ private import semmle.code.csharp.commons.Util as Util
77
private import semmle.code.csharp.commons.Collections as Collections
88
private import semmle.code.csharp.dataflow.internal.DataFlowDispatch
99
private import semmle.code.csharp.frameworks.System as System
10+
private import semmle.code.csharp.frameworks.system.linq.Expressions
1011
import semmle.code.csharp.dataflow.ExternalFlow as ExternalFlow
1112
import semmle.code.csharp.dataflow.internal.DataFlowImplCommon as DataFlowImplCommon
1213
import semmle.code.csharp.dataflow.internal.DataFlowPrivate as DataFlowPrivate
@@ -22,7 +23,7 @@ class Type = CS::Type;
2223
*/
2324
private predicate isHigherOrder(CS::Callable api) {
2425
exists(Type t | t = api.getAParameter().getType().getUnboundDeclaration() |
25-
t instanceof System::SystemFuncDelegateType
26+
t instanceof SystemLinqExpressions::DelegateExtType
2627
)
2728
}
2829

@@ -55,6 +56,8 @@ predicate asPartialModel = DataFlowPrivate::Csv::asPartialModel/1;
5556
/**
5657
* Holds for type `t` for fields that are relevant as an intermediate
5758
* read or write step in the data flow analysis.
59+
* That is, flow through any data-flow node that does not have a relevant type
60+
* will be excluded.
5861
*/
5962
predicate isRelevantType(CS::Type t) {
6063
not t instanceof CS::SimpleType and

0 commit comments

Comments
 (0)