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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 2 10:39:39 PDT 2023


aaron.ballman added a comment.

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. 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.

Also, these changes should have a release note added to `clang/docs/ReleaseNotes.rst`.



================
Comment at: clang/test/CXX/basic/basic.def/p3.cpp:1
+// RUN: %clang_cc1 -std=c++17 -verify %s -Werror -Wdeprecated -Wno-error=deprecated-redundant-constexpr-static-def
+
----------------
nuriamari wrote:
> I'm not familiar with the naming convention of these test files. https://reviews.llvm.org/D126664 included a change in p2.cpp, and there is also a p4.cpp in the same directory, so I somewhat arbitrarily named this test p3.cpp. If these are meant to somehow correspond to the C++ standard or similar, please let me know.
Tests that live in `clang/test/CXX/` or `clang/test/C` are for testing specific details of the standard specification. In C, we track based on which N-numbered document the feature was proposed in, and in C++ we track based on stable name (`basic/basic.def`) and paragraph number (`p2.cpp`) of the changes being tested.

I think your new test should live in `clang/test/SemaCXX/` as that's where we put tests for more general compiler behaviors like warning flags.


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