diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h --- a/libcxx/include/__functional/function.h +++ b/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() diff --git a/libcxx/test/libcxx/clang_tidy.sh.cpp b/libcxx/test/libcxx/clang_tidy.sh.cpp --- a/libcxx/test/libcxx/clang_tidy.sh.cpp +++ b/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.