8000 Overlay: Add QL for QL query to warn about possible non-inlining across overlay frontier by kaspersv · Pull Request #19590 · github/codeql · GitHub
[go: up one dir, main page]

Skip to content

Overlay: Add QL for QL query to warn about possible non-inlining across overlay frontier #19590

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 17, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
QL AST: Add overlay annotations
  • Loading branch information
kaspersv committed May 28, 2025
commit 5f65ea60d12dd6b69e1979c269ad52e2873114d3
33 changes: 33 additions & 0 deletions ql/ql/src/codeql_ql/ast/Ast.qll
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
}
Expand Down Expand Up @@ -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 }
Expand Down
0