Skip to content
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

C++: Parameters can have a static specifier but are not static #19221

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jketema
Copy link
Contributor

@jketema jketema commented Apr 4, 2025

This will be a problem once we output those specifiers in the extractor.

Also add a test with such a static specifier.

@Copilot Copilot bot review requested due to automatic review settings April 4, 2025 14:24
@jketema jketema requested a review from a team as a code owner April 4, 2025 14:24
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 adds a test case to verify that parameters with a static specifier are processed correctly by the extractor.

  • Added a new test function, static_array_param, that uses a static array parameter.
  • Updated the test file (cpp/ql/test/library-tests/ir/ir/c11.c) to include this scenario.
Files not reviewed (4)
  • cpp/ql/lib/semmle/code/cpp/Parameter.qll: Language not supported
  • cpp/ql/test/library-tests/ir/ir/PrintAST.expected: Language not supported
  • cpp/ql/test/library-tests/ir/ir/aliased_ir.expected: Language not supported
  • cpp/ql/test/library-tests/ir/ir/raw_ir.expected: Language not supported

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

@github-actions github-actions bot added the C++ label Apr 4, 2025
Copy link
Contributor

@MathiasVP MathiasVP left a comment

Choose a reason for hiding this comment

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

LGTM if DCA is happy (and someone else from the team also thinks it LGTT - "looks good to them"? 😂)

@jketema jketema added the no-change-note-required This PR does not need a change note label Apr 4, 2025
@jketema
Copy link
Contributor Author

jketema commented Apr 4, 2025

DCA looks good.

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