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

tests: hide warning on clang #5069

Merged
merged 1 commit into from
Mar 26, 2024
Merged

Conversation

henryiii
Copy link
Collaborator

@henryiii henryiii commented Mar 26, 2024

Description

Hide a warning in our tests on clang.

Warnings look like this:

D:/a/pybind11/pybind11/tests/test_constants_and_functions.cpp:59:15: warning: dynamic exception specifications are deprecated [-Wdeprecated-dynamic-exception-spec]
   59 | int f4(int x) throw() { return x + 4; } // Deprecated equivalent to noexcept(true)
      |               ^~~~~~~
D:/a/pybind11/pybind11/tests/test_constants_and_functions.cpp:59:15: note: use 'noexcept' instead
   59 | int f4(int x) throw() { return x + 4; } // Deprecated equivalent to noexcept(true)
      |               ^~~~~~~
      |               noexcept
D:/a/pybind11/pybind11/tests/test_constants_and_functions.cpp:72:19: warning: dynamic exception specifications are deprecated [-Wdeprecated-dynamic-exception-spec]
   72 |     int m7(int x) throw() { return x - 7; }
      |                   ^~~~~~~
D:/a/pybind11/pybind11/tests/test_constants_and_functions.cpp:72:19: note: use 'noexcept' instead
   72 |     int m7(int x) throw() { return x - 7; }
      |                   ^~~~~~~
      |                   noexcept
D:/a/pybind11/pybind11/tests/test_constants_and_functions.cpp:74:25: warning: dynamic exception specifications are deprecated [-Wdeprecated-dynamic-exception-spec]
   74 |     int m8(int x) const throw() { return x - 8; }
      |                         ^~~~~~~
D:/a/pybind11/pybind11/tests/test_constants_and_functions.cpp:74:25: note: use 'noexcept' instead
   74 |     int m8(int x) const throw() { return x - 8; }
      |                         ^~~~~~~
      |                         noexcept

3 warnings generated.

@henryiii henryiii changed the title fix: hide warning on clang tests: hide warning on clang Mar 26, 2024
Signed-off-by: Henry Schreiner <[email protected]>
Copy link
Collaborator

@rwgk rwgk left a comment

Choose a reason for hiding this comment

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

Do you still have the warning handy (the warning that's being suppressed with this PR)?

Copy-pasting it into the PR description might be a super easy way to be helpful (Google searches).

Not a big deal, but usually that's what I do.

@henryiii henryiii marked this pull request as ready for review March 26, 2024 17:30
@henryiii henryiii merged commit e0f2c71 into pybind:master Mar 26, 2024
84 checks passed
@henryiii henryiii deleted the henryiii/fix/clangwarn branch March 26, 2024 17:57
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 this pull request may close these issues.

2 participants