mirror of
https://github.com/github/codeql.git
synced 2025-12-16 08:43:11 +01:00
QL AST: Add overlay annotations
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user