-
Notifications
You must be signed in to change notification settings - Fork 1.4k
silence enum -Wshadow warnings by clang #20873
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
base: master
Are you sure you want to change the base?
Conversation
|
Is this meant to replace/extend #20793 ? |
Yes, it's a replacement since the other one was incorrect. |
Test Results 23 files 23 suites 3d 21h 43m 31s ⏱️ For more details on these failures, see this check. Results for commit 4c038ac. |
| kLast = BIT(20), // Take the last value | ||
| kIsConst = BIT(21) // Set if all values are equal | ||
| enum EStatusBits { | ||
| // clang++ (-Wshadow) complains about shadowing TMatrixT::EMatrixCreatorsOp2. Let's silence warning: |
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 confused. Is clang really complaining about TParameter::kMultiply shadowing TMatrixT::kMultiply?
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.
Yep. At least clang 15.
It's the same issue as https://issues.chromium.org/issues/41420763#comment6
Maybe related: https://stackoverflow.com/a/53844780
This Pull request:
Changes or fixes:
Fixes #20790
Tested locally with clang15, using: test.txt
I did not go into modifying ROOT/....hxx headers, they give more warnings/errors, so to run the example above, comment all include ROOT/...:
This test.txt script could maybe become part of the static analyzer we mentioned some time ago (based on https://github.com/olifre/rootStaticAnalyzer)
On the other hand, one could say this is all a bug in clang and the issue is a Won'tFix, since g++ does not shown these warnings. So I'm happy to close this PR, too.
Checklist: