diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst --- a/clang/docs/ReleaseNotes.rst +++ b/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 ----------------------- diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/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>, DefaultIgnore; +def warn_weak_template_vtable : Warning< + "this warning is no longer in use and will be removed in the next release">, + InGroup>, 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 --- 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() { }