Refactor EXP37-C rule to improve performance - #1189
Conversation
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: 1
新建议题s introduced by this change (1)
| Severity | Finding |
|---|---|
cpp/common/src/codingstandards/cpp/MistypedFunctionArguments.qll — This is explicitly a performance change to an existing query, so the “No” selection in the PR… |
What changed in this PR
Refactors EXP37-C parameter matching to improve CodeQL evaluation performance while preserving diagnostics.
Changes:
- Removes the redundant
Functionpredicate parameter. - Resolves parameters directly from each call target.
- Required performance change note is missing; runtime validation remains unconfirmed.
| File | Description |
|---|---|
MistypedFunctionArguments.qll |
Simplifies shared predicate signatures. |
DoNotCallFunctionsWithIncompatibleArguments.ql |
Updates parameter binding and predicate calls. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
/test-performance |
|
🏁 Beep Boop! Performance testing for this PR has been initiated. Please check back later for results. Note that the query package generation step must complete before testing will start so it might be a minute. |
|
🏁 Beep Boop! Performance testing complete! See below for performance of the last 3 runs vs your PR. Times are based on predicate performance. You can find full graphs and stats in the PR that was created for this test in the release engineering repo. 🏁 Below are the slowest predicates for the last 2 releases vs this PR. |

This pull request refactors the logic for detecting function calls with incompatible arguments by simplifying predicate signatures and improving how parameters are matched with function calls.
The changes focus on solving performance issues with newer CodeQL versions.
Change request type
.ql,.qll,.qlsor unit tests)Rules with added or modified queries
Release change checklist
A change note (development_handbook.md#change-notes) is required for any pull request which modifies:
If you are only adding new rule queries, a change note is not required.
Author: Is a change note required?
🚨🚨🚨
Reviewer: Confirm that format of shared queries (not the .qll file, the
.ql file that imports it) is valid by running them within VS Code.
Reviewer: Confirm that either a change note is not required or the change note is required and has been added.
Query development review checklist
For PRs that add new queries or modify existing queries, the following checklist should be completed by both the author and reviewer:
Author
As a rule of thumb, predicates specific to the query should take no more than 1 minute, and for simple queries be under 10 seconds. If this is not the case, this should be highlighted and agreed in the code review process.
Reviewer
As a rule of thumb, predicates specific to the query should take no more than 1 minute, and for simple queries be under 10 seconds. If this is not the case, this should be highlighted and agreed in the code review process.