File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
csharp/ql/src/utils/modelgenerator/internal Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,11 @@ private predicate isHigherOrder(CS::Callable api) {
3030 )
3131}
3232
33+ /** Holds if the given API is a constructor without parameters. */
34+ private predicate isParameterlessConstructor ( CS:: Callable api ) {
35+ api instanceof CS:: Constructor and api .getNumberOfParameters ( ) = 0
36+ }
37+
3338/**
3439 * Holds if it is relevant to generate models for `api`.
3540 */
@@ -38,7 +43,8 @@ private predicate isRelevantForModels(CS::Callable api) {
3843 api .getDeclaringType ( ) .getNamespace ( ) .getFullName ( ) != "" and
3944 not api instanceof CS:: ConversionOperator and
4045 not api instanceof Util:: MainMethod and
41- not api instanceof CS:: Destructor
46+ not api instanceof CS:: Destructor and
47+ not isParameterlessConstructor ( api )
4248}
4349
4450/**
You can’t perform that action at this time.
0 commit comments