Skip to content

Commit 30eaabf

Browse files
committed
QL4QL: Add overlay[discard_entity] annotation
1 parent bb0173c commit 30eaabf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ql/ql/src/codeql_ql/ast/Ast.qll

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2554,6 +2554,10 @@ private class LocalQArg extends AnnotationArg {
25542554
LocalQArg() { this.getValue() = "local?" }
25552555
}
25562556

2557+
private class DiscardEntityArg extends AnnotationArg {
2558+
DiscardEntityArg() { this.getValue() = "discard_entity" }
2559+
}
2560+
25572561
private class MonotonicAggregatesArg extends AnnotationArg {
25582562
MonotonicAggregatesArg() { this.getValue() = "monotonicAggregates" }
25592563
}
@@ -2641,6 +2645,13 @@ class OverlayLocalQ extends Annotation {
26412645
override string toString() { result = "overlay[local?]" }
26422646
}
26432647

2648+
/** An `overlay[discard_entity]` annotation. */
2649+
class OverlayDiscardEntity extends Annotation {
2650+
OverlayDiscardEntity() { this.getName() = "overlay" and this.getArgs(0) instanceof DiscardEntityArg }
2651+
2652+
override string toString() { result = "overlay[discard_entity]" }
2653+
}
2654+
26442655
/** A `language[monotonicAggregates]` annotation. */
26452656
class MonotonicAggregates extends Annotation {
26462657
MonotonicAggregates() { this.getArgs(0) instanceof MonotonicAggregatesArg }

0 commit comments

Comments
 (0)