File tree Expand file tree Collapse file tree
csharp/ql/src/utils/modelgenerator/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ private predicate isHigherOrder(CS::Callable api) {
2727 )
2828}
2929
30+ private predicate irrelevantAccessor ( CS:: Accessor a ) {
31+ exists ( CS:: Property p | p = a .getDeclaration ( ) | exists ( p .getSetter ( ) ) and exists ( p .getGetter ( ) ) )
32+ }
33+
3034/**
3135 * Holds if it is relevant to generate models for `api`.
3236 */
@@ -40,7 +44,10 @@ private predicate isRelevantForModels(CS::Callable api) {
4044 not api .( CS:: Constructor ) .isParameterless ( ) and
4145 // Disregard all APIs that have a manual model.
4246 not api = any ( FlowSummaryImpl:: Public:: SummarizedCallable sc | sc .applyManualModel ( ) ) and
43- not api = any ( FlowSummaryImpl:: Public:: NeutralSummaryCallable sc | sc .hasManualModel ( ) )
47+ not api = any ( FlowSummaryImpl:: Public:: NeutralSummaryCallable sc | sc .hasManualModel ( ) ) and
48+ // Disregard properties that have both a get and a set accessor,
49+ // which implicitly means auto implemented properties.
50+ not irrelevantAccessor ( api )
4451}
4552
4653/**
You can’t perform that action at this time.
0 commit comments