summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Wennborg <hans@chromium.org>2021-10-28 13:37:27 +0200
committerHans Wennborg <hans@chromium.org>2021-10-28 14:40:59 +0200
commit4d2765e9949f3113799527db265cd2fa1994a05e (patch)
treecfac9e4274b8954d5e1b841bd61bc2e7cf2adad6
parent57b9b29649dacdd34ef8903d7bc5e6943188f480 (diff)
downloadllvm-4d2765e9949f3113799527db265cd2fa1994a05e.tar.gz
Re-instate -Wweak-template-vtables as a no-op flag
Follow-up to 8c136805242014b6ad9ff1afcac9d7f4a18bec3f to allow a less abrupt migration for users. Differential revision: https://reviews.llvm.org/D112704
-rw-r--r--clang/docs/ReleaseNotes.rst3
-rw-r--r--clang/include/clang/Basic/DiagnosticSemaKinds.td3
-rw-r--r--clang/test/SemaCXX/warn-weak-vtables.cpp3
3 files changed, 8 insertions, 1 deletions
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 11a039204e13..b4595b20def5 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -67,7 +67,8 @@ New Compiler Flags
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
-----------------------
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index 920146f71bd8..f2dd69bbdbbd 100644
--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -1647,6 +1647,9 @@ def warn_weak_vtable : Warning<
"%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'">;
diff --git a/clang/test/SemaCXX/warn-weak-vtables.cpp b/clang/test/SemaCXX/warn-weak-vtables.cpp
index 9355af50310d..083209fa5e31 100644
--- a/clang/test/SemaCXX/warn-weak-vtables.cpp
+++ b/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() { }