- Notifications
You must be signed in to change notification settings - Fork68
ImplementConversions2
rule package#946
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
.../rules/pointertoavirtualbaseclasscasttoapointer/PointerToAVirtualBaseClassCastToAPointer.qll OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This shared implementation will be used for implementing MISRA C++2023 8.2.1.
MISRA C++ Rule 8.2.2 is similar, but not identical.
Nested macro invocations do not have getExpandedElements(), butdo have getAffectedElements().
Detects C-style casts and functional notation casts that should bereplaced with explicit cast operators. Prevents unsafe type conversionsthat lack clear intent and proper type checking constraints. [a]
Detects casts from integral, enumerated, or void pointer types to objectpointer types that may lead to unspecified behavior. [a]
Detects casts that convert pointer types to integral types, which canmake code harder to understand and may break pointer tracking in analysistools. [a]
Detects pointer-to-integral casts that use types other thanstd::uintptr_t or std::intptr_t, which may not guarantee representationof all pointer values. [a]
Detects explicit type conversions using functional notation as standaloneexpression statements that create immediately-destroyed temporaryobjects. [a]
- Simplify the query implementation - Improve query message
- Remove redundant code - Use stripSpecifiers(..) to check for use of (u)intptr_t.
24a8098
to6e9ee92
CompareThe code LGTM, however, we unfortunately have a performance issue in 8-2-2 evaluating |
Needless to say, I'll resolve the performance issue and merge. Thank you Luke! 😢 |
|
/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 canfind 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.
|
Adding@knewbury01 just to verify that this performance difference looks OK, and to review my contributed performance fix0124f5e |
cc@jeongsoolee09 to stay in the loop regarding coding standards performance! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Seems I may need to approve this for GitHub's sake?
d268839
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Description
Follows on from#919.
Change request type
.ql
,.qll
,.qls
or unit tests)Rules with added or modified queries
RULE-8-2-1
RULE-8-2-2
RULE-8-2-6
RULE-8-2-7
RULE-8-2-8
RULE-1-3
RULE-23-3
RULE-23-5
RULE-23-6
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 ofshared 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.