Re-instate -Wweak-template-vtables as a no-op flag

Follow-up to 8c13680524 to allow a less
abrupt migration for users.

Differential revision: https://reviews.llvm.org/D112704
This commit is contained in:
Hans Wennborg 2021-10-28 13:37:27 +02:00
parent 57b9b29649
commit 4d2765e994
3 changed files with 8 additions and 1 deletions

View File

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

View File

@ -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'">;

View File

@ -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() { }