Skip to content

Commit 4a0aac8

Browse files
committed
SuppressionScope non-extending subtype of SuppressionComment
1 parent d0ecaba commit 4a0aac8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cpp/ql/src/AlertSuppression.ql

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ class SuppressionComment extends Comment {
6060
/**
6161
* The scope of an alert suppression comment.
6262
*/
63-
class SuppressionScope extends ElementBase {
64-
SuppressionScope() { this instanceof SuppressionComment }
65-
63+
class SuppressionScope extends ElementBase instanceof SuppressionComment {
6664
/**
6765
* Holds if this element is at the specified location.
6866
* The location spans column `startcolumn` of line `startline` to
@@ -73,7 +71,7 @@ class SuppressionScope extends ElementBase {
7371
predicate hasLocationInfo(
7472
string filepath, int startline, int startcolumn, int endline, int endcolumn
7573
) {
76-
this.(SuppressionComment).covers(filepath, startline, startcolumn, endline, endcolumn)
74+
super.covers(filepath, startline, startcolumn, endline, endcolumn)
7775
}
7876
}
7977

0 commit comments

Comments
 (0)