Repository navigation
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2b6b35e8-4f05-4cf7-b229-2ddc3ebdd83c
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2b6b35e8-4f05-4cf7-b229-2ddc3ebdd83c
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2b6b35e8-4f05-4cf7-b229-2ddc3ebdd83c
CfgPredExpr and CfgPredPat
|
|
||
| query predicate instances(CfgPredExpr x) { toBeTested(x) and not x.isUnknown() } | ||
|
|
||
| query predicate getCfgPredicate(CfgPredExpr x, CfgPredicate getCfgPredicate) { |
Contributor
There was a problem hiding this comment.
Strictly speaking it's not wrong, this naming doesn't meet our guidelines.
I'm inclined not to worry about it much in generated code.
|
|
||
| query predicate instances(CfgPredPat x) { toBeTested(x) and not x.isUnknown() } | ||
|
|
||
| query predicate getCfgPredicate(CfgPredPat x, CfgPredicate getCfgPredicate) { |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2b6b35e8-4f05-4cf7-b229-2ddc3ebdd83c
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2b6b35e8-4f05-4cf7-b229-2ddc3ebdd83c
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2b6b35e8-4f05-4cf7-b229-2ddc3ebdd83c
paldepind
force-pushed
the
rust/cfg-expr
branch
from
October 15, 2026 13:59
811bdf2 to
15cacb0
Compare
paldepind
marked this pull request as ready for review
October 15, 2026 14:16
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The localized modeling changes follow existing patterns, include focused regression fixtures, and have no identified blocking issues.
0 open findings
What changed in this PR
Updates CodeQL’s Rust libraries to document and model configuration predicates introduced by the rust-analyzer update.
Changes:
- Documents
CfgPredExprandCfgPredPat. - Adds certain
boolinference and leaf control-flow modeling. - Adds regression fixtures and refreshes generated artifacts.
| File | Description |
|---|---|
rust/schema/annotations.py |
Defines predicate documentation and examples. |
rust/ql/test/library-tests/type-inference/type-inference.expected |
Records inferred Boolean types. |
rust/ql/test/library-tests/type-inference/cfg.rs |
Tests expression and pattern typing. |
rust/ql/test/library-tests/controlflow/cfg.rs |
Tests predicate control flow. |
rust/ql/test/library-tests/controlflow/Cfg.expected |
Records control-flow edges. |
rust/ql/test/library-tests/controlflow/BasicBlocks.expected |
Records dominance and block relationships. |
rust/ql/test/extractor-tests/generated/CfgPredPat/MISSING_SOURCE.txt |
Removes obsolete placeholder. |
rust/ql/test/extractor-tests/generated/CfgPredPat/gen_cfg_pred_pat.rs |
Adds generated pattern examples. |
rust/ql/test/extractor-tests/generated/CfgPredPat/CfgPredPat.ql |
Checks extracted patterns and predicates. |
rust/ql/test/extractor-tests/generated/CfgPredPat/CfgPredPat.expected |
Records pattern extraction results. |
rust/ql/test/extractor-tests/generated/CfgPredExpr/MISSING_SOURCE.txt |
Removes obsolete placeholder. |
rust/ql/test/extractor-tests/generated/CfgPredExpr/gen_cfg_pred_expr.rs |
Adds generated expression examples. |
rust/ql/test/extractor-tests/generated/CfgPredExpr/CfgPredExpr.ql |
Checks extracted expressions and predicates. |
rust/ql/test/extractor-tests/generated/CfgPredExpr/CfgPredExpr.expected |
Records expression extraction results. |
rust/ql/test/extractor-tests/generated/.gitattributes |
Marks new fixtures as generated. |
rust/ql/test/extractor-tests/generated/.generated_tests.list |
Tracks generated fixture hashes. |
rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll |
Infers certain Boolean types for both nodes. |
rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll |
Propagates documentation to raw classes. |
rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredPat.qll |
Documents the generated pattern class. |
rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredExpr.qll |
Documents the generated expression class. |
rust/ql/lib/codeql/rust/elements/internal/CfgPredPatImpl.qll |
Documents the pattern implementation class. |
rust/ql/lib/codeql/rust/elements/internal/CfgPredExprImpl.qll |
Documents the expression implementation class. |
rust/ql/lib/codeql/rust/elements/CfgPredPat.qll |
Documents the public pattern API. |
rust/ql/lib/codeql/rust/elements/CfgPredExpr.qll |
Documents the public expression API. |
rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll |
Documents corresponding control-flow nodes. |
rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll |
Models both predicates as leaf nodes. |
rust/ql/.gitattributes |
Updates generated query classifications. |
rust/ql/.generated.list |
Refreshes generated artifact tracking. |
🧠 Review effort: Max
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some follow up work after the last rust-analyzer update. This adds documentation and type inference for
CfgPredExprandCfgPredPat.