-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Clang: Remove -Wperf-constraint-implies-noexcept from -Wall.
#167540
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
Conversation
|
@llvm/pr-subscribers-clang Author: Doug Wyatt (dougsonos) ChangesIn adopting Full diff: https://github.com/llvm/llvm-project/pull/167540.diff 2 Files Affected:
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 980dbf1ff2cf6..fcad4c0fb7133 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -350,6 +350,8 @@ Improvements to Clang's diagnostics
Moved the warning for a missing (though implied) attribute on a redeclaration into this group.
Added a new warning in this group for the case where the attribute is missing/implicit on
an override of a virtual method.
+- Fixed several false positives and false negatives in function effect (`nonblocking`) analysis. (#GH166078) (#GH166101) (#GH166110)
+- Remove ``-Wperf-constraint-implies-noexcept`` from ``-Wall``.
- Implemented diagnostics when retrieving the tuple size for types where its specialization of `std::tuple_size`
produces an invalid size (either negative or greater than the implementation limit). (#GH159563)
- Fixed fix-it hint for fold expressions. Clang now correctly places the suggested right
@@ -482,7 +484,6 @@ Bug Fixes to Attribute Support
- Fix a crash when the function name is empty in the `swift_name` attribute. (#GH157075)
- Fixes crashes or missing diagnostics with the `device_kernel` attribute. (#GH161905)
- Fix handling of parameter indexes when an attribute is applied to a C++23 explicit object member function.
-- Fixed several false positives and false negatives in function effect (`nonblocking`) analysis. (#GH166078) (#GH166101) (#GH166110)
Bug Fixes to C++ Support
^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td
index 1e0321de3f4b6..8ec9f47c51fda 100644
--- a/clang/include/clang/Basic/DiagnosticGroups.td
+++ b/clang/include/clang/Basic/DiagnosticGroups.td
@@ -1312,9 +1312,9 @@ def Consumed : DiagGroup<"consumed">;
// Note that putting warnings in -Wall will not disable them by default. If a
// warning should be active _only_ when -Wall is passed in, mark it as
// DefaultIgnore in addition to putting it here.
-def All : DiagGroup<"all", [Most, Parentheses, Switch, SwitchBool,
- MisleadingIndentation, PackedNonPod,
- VLACxxExtension, PerfConstraintImpliesNoexcept]>;
+def All
+ : DiagGroup<"all", [Most, Parentheses, Switch, SwitchBool,
+ MisleadingIndentation, PackedNonPod, VLACxxExtension]>;
// Warnings that should be in clang-cl /w4.
def : DiagGroup<"CL4", [All, Extra]>;
|
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.
While we generally prefer fewer default-off warnings, this is specialised enough to where I think it’s fine to have it disabled by default.
I haven’t looked too closely at the CI failures, but you might have to add -Wperf-constraint-implies-noexcept to a few RUN lines.
Thanks. Clearly I forgot what other tests to run, beyond |
FYI, you can run the entire test suite w/ |
AaronBallman
left a comment
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.
LGTM!
clang/docs/ReleaseNotes.rst
Outdated
| Moved the warning for a missing (though implied) attribute on a redeclaration into this group. | ||
| Added a new warning in this group for the case where the attribute is missing/implicit on | ||
| an override of a virtual method. | ||
| - Remove ``-Wperf-constraint-implies-noexcept`` from ``-Wall``. This warning is somewhat pedantic and |
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.
Heh use of "pedantic" here may cause folks to think -pedantic is where it should live. Maybe "nit-picky"?
In adopting
[[clang::nonblocking]]there's been some user confusion. Changes to address-Wfunction-effectswarnings are often pure annotation, with no runtime effect. Changes to avoid-Wperf-constraint-implies-noexceptwarnings are risky: addingnoexceptcreates a new potential for the program to crash. In retrospect,-Wperf-constraint-implies-noexceptshouldn't have been made part of-Wall.