Repository navigation
C++: Accept regressions after github/codeql#23116 conflation fixes. - #1220
Merged
Merged
Conversation
jketema
approved these changes
Nov 13, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The updated baselines leave an accepted false positive unannotated and omit the required change note documenting affected queries and accepted regressions.
2 open issues
What changed in this PR
This PR updates C++ Coding Standards test baselines to accept temporary regressions caused by the constructor-dataflow correction in github/codeql#23116. It changes expected results and test comments, not query implementations.
Changes:
- Records new false positives in stream handling, iterator capacity, and shared-pointer ownership checks.
- Removes expected findings for affected stream-positioning and smart-pointer cases.
- Marks known regressions in test comments pending an upstream follow-up fix.
| File | Description |
|---|---|
cpp/common/test/rules/stringnumberconversionmissingerrorcheck/test.cpp |
Annotates four known false positives. |
cpp/common/test/rules/stringnumberconversionmissingerrorcheck/StringNumberConversionMissingErrorCheck.expected |
Adds four expected conversion-check alerts. |
cpp/common/test/rules/ownedpointervaluestoredinunrelatedsmartpointer/test.cpp |
Marks a smart-pointer finding as missing. |
cpp/common/test/rules/ownedpointervaluestoredinunrelatedsmartpointer/OwnedPointerValueStoredInUnrelatedSmartPointer.expected |
Removes affected findings and path data. |
cpp/common/test/rules/iofstreammissingpositioning/test.cpp |
Marks seven positioning findings as missing. |
cpp/common/test/rules/iofstreammissingpositioning/IOFstreamMissingPositioning.expected |
Removes seven expected positioning alerts. |
cpp/cert/test/rules/FIO51-CPP/test.cpp |
Annotates three file-closure false positives. |
cpp/cert/test/rules/FIO51-CPP/CloseFilesWhenTheyAreNoLongerNeeded.expected |
Adds alerts and shifts related locations to constructors. |
cpp/cert/test/rules/CTR52-CPP/test.cpp |
Annotates two iterator-capacity false positives. |
cpp/cert/test/rules/CTR52-CPP/GuaranteeGenericCppLibraryFunctionsDoNotOverflow.expected |
Adds two expected iterator-capacity alerts. |
cpp/autosar/test/rules/A20-8-4/test.cpp |
Annotates a shared-ownership false positive. |
cpp/autosar/test/rules/A20-8-4/SharedPointerUsedWithNoOwnershipSharing.expected |
Adds the expected shared-ownership alert. |
Review effort: Balanced (dynamic)
| | test.cpp:63:3:63:16 | call to terminate | The execution terminates without closing the `fstream` last accessed in $@. | test.cpp:48:16:48:19 | call to basic_fstream | call to basic_fstream | | ||
| | test.cpp:77:3:77:16 | call to terminate | The execution terminates without closing the `fstream` last accessed in $@. | test.cpp:68:22:68:28 | call to basic_fstream | call to basic_fstream | | ||
| | test.cpp:77:3:77:16 | call to terminate | The execution terminates without closing the `fstream` last accessed in $@. | test.cpp:69:22:69:29 | call to basic_fstream | call to basic_fstream | | ||
| | test.cpp:88:5:88:18 | call to terminate | The execution terminates without closing the `fstream` last accessed in $@. | test.cpp:82:21:82:27 | call to basic_fstream | call to basic_fstream | |
| @@ -1,8 +1,12 @@ | |||
| | test.cpp:9:5:9:5 | call to operator>> | Error state not checked after call to string-to-numeric conversion function operator>>. | | |||
| | test.cpp:15:33:15:33 | call to operator>> | Error state not checked after call to string-to-numeric conversion function operator>>. | | |||
| | test.cpp:51:5:51:5 | call to operator>> | Error state not checked after call to string-to-numeric conversion function operator>>. | | |||
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.

Description
github/codeql#23116 fixes a conflation problem when picking which dataflow node should satisfy
node.asExpr()after returning from a constructor call. This results in some regressions on Coding Standards queries on thenextbranch that will be fixed after a subsequent PR I'm opening soon on the CodeQL repo.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.