-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
fix some bugprone-macro-parentheses warnings #2732
Conversation
This does not even compile. |
b6c79d5
to
427eb8d
Compare
Okay, in my first attempt this used to compile. Now it also fails. Anyway: I have stripped this down to the part that does compile and also gives a successful |
427eb8d
to
1852fcf
Compare
Codecov Report
@@ Coverage Diff @@
## devel #2732 +/- ##
==========================================
+ Coverage 91.36% 91.37% +0.01%
==========================================
Files 190 190
Lines 7855 7855
==========================================
+ Hits 7176 7177 +1
+ Misses 679 678 -1 |
Thanks, I'll take a look.
I suspect that you didn't have test build enabled, and because the main library doesn't exercise those macros, breaking them won't stop it from compiling. |
Is there anything left, that I forgot about? |
You haven't forgotten about anything, I did forget about the PR though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am willing to merge the other changes, as they should not break anything.
When using the public headers of catch2 in another project that uses clang-tidy with some checks enabled, then some warnings in catch2's headers are also reported. This fixes a bunch of bugprone-macro-parentheses warnings. See: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/macro-parentheses.html
1852fcf
to
1d03457
Compare
Description
When using the public headers of catch2 in another project that uses clang-tidy with some checks enabled, then some warnings in catch2's headers are also reported. Those can distract from the real problem in our project. So I would like to reduce the warnings from catch2.
This fixes a bunch of bugprone-macro-parentheses warnings.
See: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/macro-parentheses.html
GitHub Issues
None