<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/131935>131935</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [Clang][Diagnostics] Consider splitting warning on cv-qualified base classes into a separate group
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          MagentaTreehouse
      </td>
    </tr>
</table>

<pre>
    In PR #121419, warnings were added for cv-qualified base classes. I consider it too noisy in some scenarios. Consider this code:
```c++
#include <type_traits>

inline constexpr auto op0{[] { /* do work */ }};
struct A: decltype(op0) { /* members */ };
inline constexpr auto op1{[] { /* do work */ }};
struct B: decltype(op1) { /* members */ };
// and on and on and on...
// and on and on and on...

// fix: =[
struct C: std::remove_cv_t<decltype(op1)> { /* members */ };
// and on and on and on...
```

Warnings:
```console
<source>:4:11: warning: 'const' qualifier on base class type 'decltype(op0)' (aka 'const (lambda at <source>:3:27)') has no effect [-Wignored-qualifiers]
    4 | struct A: decltype(op0) { /* members */ };
      |           ^
<source>:4:11: note: base class 'decltype(op0)' (aka 'const (lambda at <source>:3:27)') specified here
<source>:6:11: warning: 'const' qualifier on base class type 'decltype(op1)' (aka 'const (lambda at <source>:5:27)') has no effect [-Wignored-qualifiers]
    6 | struct B: decltype(op1) { /* members */ };
 |           ^
<source>:6:11: note: base class 'decltype(op1)' (aka 'const (lambda at <source>:5:27)') specified here
```

and on and on and on...

The `const` comes from decltyping from `constexpr` variables. I would argue that the language rule is doing me a favor here, so that I don't have to add unnecessary verbosity by specifying `std::remove_cv_t` to each one of them.

It would be nice to split this warning into a separate group, so that it is not enabled by `-Wextra`, or that at least I can turn this specific warning off.

CC @a-tarasyuk @erichkeane 
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0VsFu4zgM_RrlQiSwJcduDjk4bgP0sMBiMUCP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