[libcxx-commits] [PATCH] D127900: [libc++] Enable -Wweak-vtables

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jun 18 08:27:55 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG55cb62f34a6f: [libc++] Enable -Wweak-vtables (authored by philnik).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127900/new/

https://reviews.llvm.org/D127900

Files:
  libcxx/include/__functional/function.h
  libcxx/test/libcxx/clang_tidy.sh.cpp


Index: libcxx/test/libcxx/clang_tidy.sh.cpp
===================================================================
--- libcxx/test/libcxx/clang_tidy.sh.cpp
+++ libcxx/test/libcxx/clang_tidy.sh.cpp
@@ -9,7 +9,7 @@
 // REQUIRES: has-clang-tidy
 // XFAIL: modules-build
 
-// RUN: clang-tidy %s --warnings-as-errors=* -header-filter=.* -- -Wno-unknown-warning-option %{compile_flags}
+// RUN: clang-tidy %s --warnings-as-errors=* -header-filter=.* -- -Wweak-vtables -Wno-unknown-warning-option %{compile_flags}
 // -Wno-unknown-warning-option tells clang-tidy to ignore '-W' command-line arguments that it doesn't know.
 // There are some GCC-specific ones where clang-tidy would warn otherwise.
 
Index: libcxx/include/__functional/function.h
===================================================================
--- libcxx/include/__functional/function.h
+++ libcxx/include/__functional/function.h
@@ -35,6 +35,8 @@
 
 // bad_function_call
 
+_LIBCPP_DIAGNOSTIC_PUSH
+_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wweak-vtables")
 class _LIBCPP_EXCEPTION_ABI bad_function_call
     : public exception
 {
@@ -52,6 +54,7 @@
     virtual const char* what() const _NOEXCEPT;
 #endif
 };
+_LIBCPP_DIAGNOSTIC_POP
 
 _LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
 void __throw_bad_function_call()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127900.438131.patch
Type: text/x-patch
Size: 1277 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220618/f6a915ac/attachment-0001.bin>


More information about the libcxx-commits mailing list