Skip to content

Commit a29446a

Browse files
committed
C#/Java: Address review comments.
1 parent 7f7c5d7 commit a29446a

File tree

4 files changed

+13
-20
lines changed

4 files changed

+13
-20
lines changed

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,6 @@ private module Printing implements PrintingSig {
4141

4242
module ModelPrinting = PrintingImpl<Printing>;
4343

44-
/**
45-
* Gets the underlying type of the content `c`.
46-
*/
47-
private Type getUnderlyingContentType(DataFlow::Content c) {
48-
result = getUnderlyingContentTypeSpecific(c) or
49-
result = c.(DataFlow::FieldContent).getField().getType() or
50-
result = c.(DataFlow::SyntheticFieldContent).getField().getType()
51-
}
52-
5344
/**
5445
* Holds if `c` is a relevant content kind, where the underlying type is relevant.
5546
*/

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,12 @@ predicate isRelevantType(CS::Type t) {
173173
not irrelevantCollectionType(t)
174174
}
175175

176-
CS::Type getUnderlyingContentTypeSpecific(DataFlow::Content c) {
176+
/**
177+
* Gets the underlying type of the content `c`.
178+
*/
179+
CS::Type getUnderlyingContentType(DataFlow::Content c) {
180+
result = c.(DataFlow::FieldContent).getField().getType() or
181+
result = c.(DataFlow::SyntheticFieldContent).getField().getType() or
177182
result = c.(DataFlow::PropertyContent).getProperty().getType()
178183
}
179184

java/ql/src/utils/modelgenerator/internal/CaptureModels.qll

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,6 @@ private module Printing implements PrintingSig {
4141

4242
module ModelPrinting = PrintingImpl<Printing>;
4343

44-
/**
45-
* Gets the underlying type of the content `c`.
46-
*/
47-
private Type getUnderlyingContentType(DataFlow::Content c) {
48-
result = getUnderlyingContentTypeSpecific(c) or
49-
result = c.(DataFlow::FieldContent).getField().getType() or
50-
result = c.(DataFlow::SyntheticFieldContent).getField().getType()
51-
}
52-
5344
/**
5445
* Holds if `c` is a relevant content kind, where the underlying type is relevant.
5546
*/

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,13 @@ predicate isRelevantType(J::Type t) {
186186
)
187187
}
188188

189-
J::Type getUnderlyingContentTypeSpecific(DataFlow::Content c) { none() }
189+
/**
190+
* Gets the underlying type of the content `c`.
191+
*/
192+
J::Type getUnderlyingContentType(DataFlow::Content c) {
193+
result = c.(DataFlow::FieldContent).getField().getType() or
194+
result = c.(DataFlow::SyntheticFieldContent).getField().getType()
195+
}
190196

191197
/**
192198
* Gets the MaD string representation of the qualifier.

0 commit comments

Comments
 (0)