Skip to content

Commit 254c6c3

Browse files
committed
C#: Address review comments.
1 parent dc34cb0 commit 254c6c3

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

csharp/ql/src/Telemetry/ExternalApi.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ private predicate isUninteresting(Callable c) {
1919
or
2020
// The data flow library uses read/store steps for properties, so we don't need to model them,
2121
// if both a getter and a setter exist.
22-
exists(Property p | p = c.(Accessor).getDeclaration() |
23-
exists(p.getSetter()) and exists(p.getGetter())
24-
)
22+
c.(Accessor).getDeclaration().(Property).isReadWrite()
2523
}
2624

2725
/**

csharp/ql/src/utils/modeleditor/ModelEditor.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ private predicate isUninteresting(Callable c) {
1717
or
1818
// The data flow library uses read/store steps for properties, so we don't need to model them,
1919
// if both a getter and a setter exist.
20-
exists(Property p | p = c.(Accessor).getDeclaration() |
21-
exists(p.getSetter()) and exists(p.getGetter())
22-
)
20+
c.(Accessor).getDeclaration().(Property).isReadWrite()
2321
}
2422

2523
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ private predicate isHigherOrder(CS::Callable api) {
2828
}
2929

3030
private predicate irrelevantAccessor(CS::Accessor a) {
31-
exists(CS::Property p | p = a.getDeclaration() | exists(p.getSetter()) and exists(p.getGetter()))
31+
a.getDeclaration().(CS::Property).isReadWrite()
3232
}
3333

3434
/**

0 commit comments

Comments
 (0)