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
1111import internal.CaptureSummaryFlowQuery
1212
1313from DataFlowTargetApi api , string noflow
14- where
15- noflow = captureNoFlow ( api ) and
16- not api .( FlowSummaryImpl:: Public:: SummarizedCallable ) .applyManualModel ( )
14+ where noflow = captureNoFlow ( api )
1715select noflow order by noflow
Original file line number Diff line number Diff line change @@ -11,7 +11,5 @@ import internal.CaptureModels
1111import internal.CaptureSummaryFlowQuery
1212
1313from DataFlowTargetApi api , string flow
14- where
15- flow = captureFlow ( api ) and
16- not api .( FlowSummaryImpl:: Public:: SummarizedCallable ) .applyManualModel ( )
14+ where flow = captureFlow ( api )
1715select flow order by flow
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ private import dotnet
77private import semmle.code.csharp.commons.Util as Util
88private import semmle.code.csharp.commons.Collections as Collections
99private import semmle.code.csharp.dataflow.internal.DataFlowDispatch
10+ private import semmle.code.csharp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl
1011private import semmle.code.csharp.frameworks.system.linq.Expressions
1112import semmle.code.csharp.dataflow.internal.ExternalFlow as ExternalFlow
1213import semmle.code.csharp.dataflow.internal.DataFlowImplCommon as DataFlowImplCommon
@@ -37,7 +38,10 @@ private predicate isRelevantForModels(CS::Callable api) {
3738 not api instanceof Util:: MainMethod and
3839 not api instanceof CS:: Destructor and
3940 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 ( ) )
4145}
4246
4347/**
Original file line number Diff line number Diff line change 55private import java as J
66private import semmle.code.java.dataflow.internal.DataFlowPrivate
77private import semmle.code.java.dataflow.internal.ContainerFlow as ContainerFlow
8+ private import semmle.code.java.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl
89private import semmle.code.java.dataflow.internal.ModelExclusions
910private import semmle.code.java.dataflow.DataFlow as Df
1011private import semmle.code.java.dataflow.SSA as Ssa
@@ -37,7 +38,11 @@ private predicate isInfrequentlyUsed(J::CompilationUnit cu) {
3738 */
3839private predicate isRelevantForModels ( J:: Callable api ) {
3940 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 ( )
4146}
4247
4348/**
You can’t perform that action at this time.
0 commit comments