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

Wunused-variable in (DYNAMIC_)SECTION when CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT is enabled #2816

Closed
mjerabek opened this issue Feb 19, 2024 · 1 comment · Fixed by #2817

Comments

@mjerabek
Copy link
Contributor

Describe the bug

In static analysis mode, the argument of SECTION/DYNAMIC_SECTION is not evaluated. If it contains
a variable that is used only there, it'll lead to Wunused-variable warning.

Expected behavior
No warning

Reproduction steps

https://compiler-explorer.com/z/K9fxKGaz4

Platform information:

  • Compiler+version: clang (clang-tidy)
  • Catch version: devel
@mjerabek
Copy link
Contributor Author

Hmm, and there's the same problem with TEST_CASE: https://compiler-explorer.com/z/YcWhYv5ba

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant