[PATCH] D112704: Re-instate -Wweak-template-vtables as a no-op flag

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 28 04:40:02 PDT 2021


hans created this revision.
hans added reviewers: thakis, dblaikie.
hans requested review of this revision.
Herald added a project: clang.

Follow-up to https://github.com/llvm/llvm-project/commit/8c136805242014b6ad9ff1afcac9d7f4a18bec3f to allow a less abrupt migration for users.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112704

Files:
  clang/docs/ReleaseNotes.rst
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/test/SemaCXX/warn-weak-vtables.cpp


Index: clang/test/SemaCXX/warn-weak-vtables.cpp
===================================================================
--- clang/test/SemaCXX/warn-weak-vtables.cpp
+++ clang/test/SemaCXX/warn-weak-vtables.cpp
@@ -3,6 +3,9 @@
 // Check that this warning is disabled on MS ABI targets which don't have key
 // functions.
 // RUN: %clang_cc1 %s -fsyntax-only -triple %ms_abi_triple -Werror -Wweak-vtables
+//
+// -Wweak-template-vtables is deprecated but we still parse it.
+// RUN: %clang_cc1 %s -fsyntax-only -Werror -Wweak-template-vtables
 
 struct A { // expected-warning {{'A' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit}}
   virtual void f() { } 
Index: clang/include/clang/Basic/DiagnosticSemaKinds.td
===================================================================
--- clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -1647,6 +1647,9 @@
   "%0 has no out-of-line virtual method definitions; its vtable will be "
   "emitted in every translation unit">,
   InGroup<DiagGroup<"weak-vtables">>, DefaultIgnore;
+def warn_weak_template_vtable : Warning<
+  "this warning is no longer in use and will be removed in the next release">,
+  InGroup<DiagGroup<"weak-template-vtables">>, DefaultIgnore;
 
 def ext_using_undefined_std : ExtWarn<
   "using directive refers to implicitly-defined namespace 'std'">;
Index: clang/docs/ReleaseNotes.rst
===================================================================
--- clang/docs/ReleaseNotes.rst
+++ clang/docs/ReleaseNotes.rst
@@ -67,7 +67,8 @@
 Deprecated Compiler Flags
 -------------------------
 
-- ...
+- -Wweak-template-vtables has been deprecated and no longer has any effect. The
+  flag will be removed in the next release.
 
 Modified Compiler Flags
 -----------------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112704.382989.patch
Type: text/x-patch
Size: 1847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211028/aec4e655/attachment.bin>


More information about the cfe-commits mailing list