Skip to content

Commit

Permalink
C#: Address review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnebel committed Apr 12, 2024
1 parent dc34cb0 commit 254c6c3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions csharp/ql/src/Telemetry/ExternalApi.qll
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ private predicate isUninteresting(Callable c) {
or
// The data flow library uses read/store steps for properties, so we don't need to model them,
// if both a getter and a setter exist.
exists(Property p | p = c.(Accessor).getDeclaration() |
exists(p.getSetter()) and exists(p.getGetter())
)
c.(Accessor).getDeclaration().(Property).isReadWrite()
}

/**
Expand Down
4 changes: 1 addition & 3 deletions csharp/ql/src/utils/modeleditor/ModelEditor.qll
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ private predicate isUninteresting(Callable c) {
or
// The data flow library uses read/store steps for properties, so we don't need to model them,
// if both a getter and a setter exist.
exists(Property p | p = c.(Accessor).getDeclaration() |
exists(p.getSetter()) and exists(p.getGetter())
)
c.(Accessor).getDeclaration().(Property).isReadWrite()
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private predicate isHigherOrder(CS::Callable api) {
}

private predicate irrelevantAccessor(CS::Accessor a) {
exists(CS::Property p | p = a.getDeclaration() | exists(p.getSetter()) and exists(p.getGetter()))
a.getDeclaration().(CS::Property).isReadWrite()
}

/**
Expand Down

0 comments on commit 254c6c3

Please sign in to comment.