[libcxx-commits] [PATCH] D127900: [libc++] Enable -Wweak-vtables
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 15 16:48:14 PDT 2022
philnik updated this revision to Diff 437401.
philnik added a comment.
- Enable the warning only for clang-tidy
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.437401.patch
Type: text/x-patch
Size: 1277 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220615/22dedbee/attachment-0001.bin>
More information about the libcxx-commits
mailing list