Clang: Remove -Wperf-constraint-implies-noexcept from -Wall. by dougsonos · Pull Request #167540 · llvm/llvm-project (original) (raw)

@llvm/pr-subscribers-clang

Author: Doug Wyatt (dougsonos)

Changes

In adopting [[clang::nonblocking]] there's been some user confusion. Changes to address -Wfunction-effects warnings are often pure annotation, with no runtime effect. Changes to avoid -Wperf-constraint-implies-noexcept warnings are risky: adding noexcept creates a new potential for the program to crash. In retrospect, -Wperf-constraint-implies-noexcept shouldn't have been made part of -Wall.


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.

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,

+def All

// Warnings that should be in clang-cl /w4. def : DiagGroup<"CL4", [All, Extra]>;