File tree Expand file tree Collapse file tree 5 files changed +13
-23
lines changed
csharp/ql/src/utils/modelgenerator
java/ql/src/utils/modelgenerator/internal Expand file tree Collapse file tree 5 files changed +13
-23
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -11,7 +11,5 @@ import internal.CaptureModels
11
11
import internal.CaptureSummaryFlowQuery
12
12
13
13
from DataFlowTargetApi api , string noflow
14
- where
15
- noflow = captureNoFlow ( api ) and
16
- not api .( FlowSummaryImpl:: Public:: SummarizedCallable ) .applyManualModel ( )
14
+ where noflow = captureNoFlow ( api )
17
15
select noflow order by noflow
Original file line number Diff line number Diff line change @@ -11,7 +11,5 @@ import internal.CaptureModels
11
11
import internal.CaptureSummaryFlowQuery
12
12
13
13
from DataFlowTargetApi api , string flow
14
- where
15
- flow = captureFlow ( api ) and
16
- not api .( FlowSummaryImpl:: Public:: SummarizedCallable ) .applyManualModel ( )
14
+ where flow = captureFlow ( api )
17
15
select flow order by flow
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ private import dotnet
7
7
private import semmle.code.csharp.commons.Util as Util
8
8
private import semmle.code.csharp.commons.Collections as Collections
9
9
private import semmle.code.csharp.dataflow.internal.DataFlowDispatch
10
+ private import semmle.code.csharp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl
10
11
private import semmle.code.csharp.frameworks.system.linq.Expressions
11
12
import semmle.code.csharp.dataflow.internal.ExternalFlow as ExternalFlow
12
13
import semmle.code.csharp.dataflow.internal.DataFlowImplCommon as DataFlowImplCommon
@@ -37,7 +38,10 @@ private predicate isRelevantForModels(CS::Callable api) {
37
38
not api instanceof Util:: MainMethod and
38
39
not api instanceof CS:: Destructor and
39
40
not api instanceof CS:: AnonymousFunctionExpr and
40
- not api .( CS:: Constructor ) .isParameterless ( )
41
+ not api .( CS:: Constructor ) .isParameterless ( ) and
42
+ // Disregard all APIs that have a manual model.
43
+ not api = any ( FlowSummaryImpl:: Public:: SummarizedCallable sc | sc .applyManualModel ( ) ) and
44
+ not api = any ( FlowSummaryImpl:: Public:: NeutralSummaryCallable sc | sc .hasManualModel ( ) )
41
45
}
42
46
43
47
/**
Original file line number Diff line number Diff line change 5
5
private import java as J
6
6
private import semmle.code.java.dataflow.internal.DataFlowPrivate
7
7
private import semmle.code.java.dataflow.internal.ContainerFlow as ContainerFlow
8
+ private import semmle.code.java.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl
8
9
private import semmle.code.java.dataflow.internal.ModelExclusions
9
10
private import semmle.code.java.dataflow.DataFlow as Df
10
11
private import semmle.code.java.dataflow.SSA as Ssa
@@ -37,7 +38,11 @@ private predicate isInfrequentlyUsed(J::CompilationUnit cu) {
37
38
*/
38
39
private predicate isRelevantForModels ( J:: Callable api ) {
39
40
not isUninterestingForModels ( api ) and
40
- not isInfrequentlyUsed ( api .getCompilationUnit ( ) )
41
+ not isInfrequentlyUsed ( api .getCompilationUnit ( ) ) and
42
+ // Disregard all APIs that have a manual model.
43
+ not api = any ( FlowSummaryImpl:: Public:: SummarizedCallable sc | sc .applyManualModel ( ) ) .asCallable ( ) and
44
+ not api =
45
+ any ( FlowSummaryImpl:: Public:: NeutralSummaryCallable sc | sc .hasManualModel ( ) ) .asCallable ( )
41
46
}
42
47
43
48
/**
You can’t perform that action at this time.
0 commit comments