AaronBallman wrote:

> Ideally, i think the warning would only happen by default in pedantic modes, 
> in C++23 and later (This was deprecated as part of P1787R6). It's a pretty 
> noisy warning for an harmless construct.

It's not really a `-pedantic` diagnostic though because it's not an extension 
for us to support it.

> However it would make sense than one should be able to opt-in the warning 
> unconditionally.
> 
> I'm not sure whether there is a good way to do that @AaronBallman

I would recommend:
  * the diagnostic is in its own diagnostic group, so users can opt-in or out 
explicitly as needed
  * put that diagnostic group under `-Wdeprecated` so it can be controlled with 
other deprecation diagnostics
  * ignore the diagnostic by default but do a similar dance to the one done in 
https://github.com/llvm/llvm-project/commit/e5f7123dfef3a80937d088d846ddb3b2bb1869b9
 to enable it in C++23.

WDYT?

> I would also update most of our tests not to use `template` where it's 
> deprecated, except in tests where we are explicitly testing that warning

+1

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

Reply via email to