https://github.com/erichkeane commented:

This I think ends up being the 'minimum' patch here, but see my suggestion on 
the bug:

>I also believe there is value to only diagnosing this on EXPLICIT qualifiers 
>(or a separate, additional warning to do so), not ones that get picked up from 
>the template.

The more I think about it, the more I think that we should modify the warning 
to only happen on EXPLICIT qualifiers.  So:

```
struct Base{};
using CBase = const Base;

struct D1 : const Base {}; // DOES warn
struct D2 : CBase{}; // a DIFFERENT warning (same wording perhaps?) under a 
different group.
template<typename T> Templ: const T{};
Templ<Base> t; // Causes same warning as D1.
template<typename T> Templ2 : T{};  
Templ2<CBase> t; // Causes same warning as D2.
```

If you search for where that diagnostic is emitted, you should see that.  You 
might have to do some debugging to figure out how to differentiate the cases 
though.



https://github.com/llvm/llvm-project/pull/132116
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to