Skip to content

C++: Fix typo in downgrade script #19652

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2025
Merged

C++: Fix typo in downgrade script #19652

merged 1 commit into from
Jun 3, 2025

Conversation

jketema
Copy link
Contributor

@jketema jketema commented Jun 3, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings June 3, 2025 10:26
@jketema jketema requested a review from a team as a code owner June 3, 2025 10:26
@github-actions github-actions bot added the C++ label Jun 3, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a typo in the C++ downgrade script’s getKind function so that kind = 16 (for #elifdef/#elifndef) is correctly mapped to result 3 instead of an unintended 6.

  • Correct the condition to check for kind = 16 instead of kind = 6
  • Ensure preprocessor directive mapping aligns with intended behavior
Comments suppressed due to low confidence (1)

cpp/downgrades/59cb96ca699929b63941e81905f9b8de7eed59a6/preprocdirects.ql:14

  • Add or update unit tests to cover the case where kind equals 16 to verify that it correctly maps to result 3 and prevent regressions.
if kind = 15 or kind = 16

@jketema jketema merged commit 5e84c71 into github:main Jun 3, 2025
8 checks passed
@jketema jketema deleted the down-typo branch June 3, 2025 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants