[llvm] r341361 - Disable -Wnoexcept-type due to false positives with GCC.
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 4 05:03:50 PDT 2018
Author: aaronballman
Date: Tue Sep 4 05:03:49 2018
New Revision: 341361
URL: http://llvm.org/viewvc/llvm-project?rev=341361&view=rev
Log:
Disable -Wnoexcept-type due to false positives with GCC.
GCC triggers false positives if a nothrow function is called through a template argument. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80985 for details. The LLVM libraries have no stable C++ API, so the warning is not useful.
Modified:
llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=341361&r1=341360&r2=341361&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Tue Sep 4 05:03:49 2018
@@ -585,6 +585,10 @@ if (LLVM_ENABLE_WARNINGS AND (LLVM_COMPI
check_cxx_compiler_flag("-Wclass-memaccess" CXX_SUPPORTS_CLASS_MEMACCESS_FLAG)
append_if(CXX_SUPPORTS_CLASS_MEMACCESS_FLAG "-Wno-class-memaccess" CMAKE_CXX_FLAGS)
+ # The LLVM libraries have no stable C++ API, so -Wnoexcept-type is not useful.
+ check_cxx_compiler_flag("-Wnoexcept-type" CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG)
+ append_if(CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG "-Wno-noexcept-type" CMAKE_CXX_FLAGS)
+
# Check if -Wnon-virtual-dtor warns even though the class is marked final.
# If it does, don't add it. So it won't be added on clang 3.4 and older.
# This also catches cases when -Wnon-virtual-dtor isn't supported by
More information about the llvm-commits
mailing list