Skip to content

Commit 9de3617

Browse files
committed
QL4QL: Add overlay[discard_entity] annotation
1 parent bb0173c commit 9de3617

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 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,15 @@ 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() {
2651+
this.getName() = "overlay" and this.getArgs(0) instanceof DiscardEntityArg
2652+
}
2653+
2654+
override string toString() { result = "overlay[discard_entity]" }
2655+
}
2656+
26442657
/** A `language[monotonicAggregates]` annotation. */
26452658
class MonotonicAggregates extends Annotation {
26462659
MonotonicAggregates() { this.getArgs(0) instanceof MonotonicAggregatesArg }

0 commit comments

Comments
 (0)