[PATCH] D153881: Create diagnostic group for definition deprecation warning

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 5 06:51:56 PDT 2023


aaron.ballman added a comment.

In D153881#4468597 <https://reviews.llvm.org/D153881#4468597>, @nuriamari wrote:

> In D153881#4467127 <https://reviews.llvm.org/D153881#4467127>, @aaron.ballman wrote:
>
>> I think it's a bit odd that we'd leave `const` under `-Wdeprecated` but separate `constexpr` out into its own warning flag, but I'm also not opposed.
>
> Would moving both const and constexpr into their own warning flag work? I don't really see cases where you'd want to disable only one or the other.

I think that would work better, yes.

>> Can you explain the need a bit more though? I think our belief was that silencing this diagnostic was pretty trivial (delete the line in question), so we wouldn't need a separate diagnostic group for it.
>
> In our case we have libraries that are consumed both with say C++14 and C++17, so we can't just delete them, we've needed to add a standard version check. Admittedly not a huge change either, but we ran into many occurrences of this warning trying to adopt the latest Clang. I suppose I don't see the downside of a little more granular control.

Ah, I see now, thank you. Backcompat would be harder without this kind of granular control, so I'm okay with this direction.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153881/new/

https://reviews.llvm.org/D153881



More information about the cfe-commits mailing list