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

Nuri Amari via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 10 11:36:51 PDT 2023


nuriamari added inline comments.


================
Comment at: clang/docs/ReleaseNotes.rst:373
   (`#13920: <https://github.com/llvm/llvm-project/issues/13920>`_)
+- A new diagnostic warning group ``deprecated-redundant-constexpr-static-def`` is
+  added. This is to be used to control warnings about out-of-line definitions of
----------------
Happy to use a better flag name, if anyone has ideas. Considered expanding to be more descriptive, but its already quite long.


================
Comment at: clang/test/SemaCXX/redundant-out-of-line-static-constexpr-member-def-diag.cpp:9
+  constexpr int A::n; // expected-warning{{out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated}}
+  const int A::m; // expected-warning{{out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated}}
+}
----------------
Unbeknownst to me, the `const` variant of this diagnostic (still about a static constexpr member, but defined out-of-line with const) is already controlled via the same diagnostic group. Is this the behavior you expect @aaron.ballman?


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