Skip to content

Unified: Add some more AST classes. - #22475

Merged
aschackmull merged 4 commits into
github:mainfrom
aschackmull:unified/ast-binaryexpr
Sep 1, 2026
Merged

Unified: Add some more AST classes.#22475
aschackmull merged 4 commits into
github:mainfrom
aschackmull:unified/ast-binaryexpr

Conversation

@aschackmull

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI balanced review requested due to automatic review settings September 1, 2026 07:57
@aschackmull
aschackmull requested a review from a team as a code owner September 1, 2026 07:57
@aschackmull aschackmull added the no-change-note-required This PR does not need a change note label Sep 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The new public logical-expression classifications lack direct QL library tests.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 Medium severity

New issues introduced by this change (1)
Severity Finding
Medium severity unified/​ql/​lib/​codeql/​unified/​internal/​AstExtra.qll — Add a unified library test that queries LogicalOrExpr, NullCoalescingExpr, and LogicalNotExpr
What changed in this PR

Adds unified AST abstractions for binary and logical expressions.

Changes:

  • Adds shared binary-expression operand traversal.
  • Adds logical OR, null-coalescing, and logical NOT classifications.
File Description
FacadeAst.qll Adds the BinaryExpr facade and operand accessor.
AstExtra.qll Adds logical-expression classes based on operator shape.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +13 to +15
/** A short-circuiting logical OR expression. */
class LogicalOrExpr extends BinaryExpr {
LogicalOrExpr() { this.getOperator().getValue() = "||" }
@aschackmull
aschackmull merged commit 164d97d into github:main Sep 1, 2026
14 checks passed
@aschackmull
aschackmull deleted the unified/ast-binaryexpr branch September 1, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants