Skip to content

Conversation

paldepind
Copy link
Contributor

Adds a test to confirm and ensure that cpp/uninitialized-local doesn't produce false positives for va_copy when va_copy is extracted as what we would expect.

@paldepind paldepind requested a review from a team as a code owner September 2, 2024 11:26
@github-actions github-actions bot added the C++ label Sep 2, 2024
@paldepind paldepind added no-change-note-required This PR does not need a change note C++ and removed C++ labels Sep 2, 2024
use(foo); // BAD (NOT REPORTED)
}

void test_va_copy(va_list va) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I put the test here since the preceding test is also about va_list. All the other tests are numbered consecutively, but I gave this one a name in order to avoid having to rename every test following this one.

Copy link
Contributor

@geoffw0 geoffw0 left a comment

Choose a reason for hiding this comment

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

Thanks for adding this.

@paldepind paldepind merged commit e294c8e into github:main Sep 2, 2024
9 of 10 checks passed
@paldepind paldepind deleted the test-for-uninitialized-local branch September 2, 2024 12:30
jketema added a commit to jketema/codeql that referenced this pull request Sep 2, 2024
jketema added a commit that referenced this pull request Sep 2, 2024
C++: Update expected test results after #17347
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ 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.

2 participants