diff --git a/ql/ql/src/codeql_ql/ast/Ast.qll b/ql/ql/src/codeql_ql/ast/Ast.qll index 937c7bc6101..b3bbf41aaef 100644 --- a/ql/ql/src/codeql_ql/ast/Ast.qll +++ b/ql/ql/src/codeql_ql/ast/Ast.qll @@ -2538,6 +2538,18 @@ private class NoOptArg extends AnnotationArg { NoOptArg() { this.getValue() = "noopt" } } +private class CallerArg extends AnnotationArg { + CallerArg() { this.getValue() = "caller" } +} + +private class LocalArg extends AnnotationArg { + LocalArg() { this.getValue() = "local" } +} + +private class LocalQArg extends AnnotationArg { + LocalQArg() { this.getValue() = "local?" } +} + private class MonotonicAggregatesArg extends AnnotationArg { MonotonicAggregatesArg() { this.getValue() = "monotonicAggregates" } } @@ -2597,6 +2609,27 @@ class NoOpt extends Annotation { override string toString() { result = "noopt" } } +/** An `overlay[caller]` annotation. */ +class OverlayCaller extends Annotation { + OverlayCaller() { this.getName() = "overlay" and this.getArgs(0) instanceof CallerArg } + + override string toString() { result = "caller" } +} + +/** An `overlay[local]` annotation. */ +class OverlayLocal extends Annotation { + OverlayLocal() { this.getName() = "overlay" and this.getArgs(0) instanceof LocalArg } + + override string toString() { result = "local" } +} + +/** An `overlay[local?]` annotation. */ +class OverlayLocalQ extends Annotation { + OverlayLocalQ() { this.getName() = "overlay" and this.getArgs(0) instanceof LocalQArg } + + override string toString() { result = "local?" } +} + /** A `language[monotonicAggregates]` annotation. */ class MonotonicAggregates extends Annotation { MonotonicAggregates() { this.getArgs(0) instanceof MonotonicAggregatesArg }