[Mlir-commits] [mlir] [MLIR][CMake] Suppress -Wpass-failed warning	(PR #160472)
    Mehdi Amini 
    llvmlistbot at llvm.org
       
    Mon Sep 29 03:21:45 PDT 2025
    
    
  
================
@@ -110,6 +110,12 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
   endif()
 endif()
 
+# libstdc++15 makes use of an unroll pragma inside std::find_if(). This
+# produces a warning if clang fails to unroll the loop. As this pragma is
+# outside of our control, suppress the warning.
+check_cxx_compiler_flag("-Wno-pass-failed" CXX_SUPPORTS_WNO_PASS_FAILED)
+append_if(CXX_SUPPORTS_WNO_PASS_FAILED "-Wno-pass-failed" CMAKE_CXX_FLAGS)
----------------
joker-eph wrote:
> Why not? Not all warnings are interesting for all projects.
Clang warnings aren't supposed to have false positive. That is, for ` -Wall -Wextra`, at least when I use to work on clang such warning would be removed from -Wextra and moved to -Weverything.
https://github.com/llvm/llvm-project/pull/160472
    
    
More information about the Mlir-commits
mailing list