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) {
30
30
)
31
31
}
32
32
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
+
33
38
/**
34
39
* Holds if it is relevant to generate models for `api`.
35
40
*/
@@ -38,7 +43,8 @@ private predicate isRelevantForModels(CS::Callable api) {
38
43
api .getDeclaringType ( ) .getNamespace ( ) .getFullName ( ) != "" and
39
44
not api instanceof CS:: ConversionOperator and
40
45
not api instanceof Util:: MainMethod and
41
- not api instanceof CS:: Destructor
46
+ not api instanceof CS:: Destructor and
47
+ not isParameterlessConstructor ( api )
42
48
}
43
49
44
50
/**
You can’t perform that action at this time.
0 commit comments