Skip to content

Commit 33955ee

Browse files
authored
Merge pull request github#11623 from jcogs33/jcogs33/exclude-funcexpr-from-dataflowtargetapi
Java/C#: exclude `FunctionalExpr`s from `DataFlowTargetApi`
2 parents 8703da9 + 11bd356 commit 33955ee

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

csharp/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ private predicate isRelevantForModels(CS::Callable api) {
3939
not api instanceof CS::ConversionOperator and
4040
not api instanceof Util::MainMethod and
4141
not api instanceof CS::Destructor and
42+
not api instanceof CS::AnonymousFunctionExpr and
4243
not api.(CS::Constructor).isParameterless()
4344
}
4445

java/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ private predicate isRelevantForModels(J::Callable api) {
6565
not isJdkInternal(api.getCompilationUnit()) and
6666
not api instanceof J::MainMethod and
6767
not api instanceof J::StaticInitializer and
68+
not exists(J::FunctionalExpr funcExpr | api = funcExpr.asMethod()) and
6869
not api.(J::Constructor).isParameterless()
6970
}
7071

0 commit comments

Comments
 (0)