[llvm] 9a70885 - Disable MSVC C5105 warnings
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 9 06:28:28 PST 2023
Author: Aaron Ballman
Date: 2023-02-09T09:28:19-05:00
New Revision: 9a708855daeb6f70bbde7c2bc63e061ebaf072df
URL: https://github.com/llvm/llvm-project/commit/9a708855daeb6f70bbde7c2bc63e061ebaf072df
DIFF: https://github.com/llvm/llvm-project/commit/9a708855daeb6f70bbde7c2bc63e061ebaf072df.diff
LOG: Disable MSVC C5105 warnings
Suppresses "macro expansion producing 'defined' has undefined behavior"
due to the diagnostic triggering in WinBase.h (a system header file).
Added:
Modified:
llvm/cmake/modules/HandleLLVMOptions.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 1ac9a20513bff..083d4f93938a6 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -668,6 +668,10 @@ if (MSVC)
# is fixed.
-wd4709 # Suppress comma operator within array index expression
+ # We'd like this warning to be enabled, but it triggers from code in
+ # WinBase.h that we don't have control over.
+ -wd5105 # Suppress macro expansion producing 'defined' has undefined behavior
+
# Ideally, we'd like this warning to be enabled, but even MSVC 2019 doesn't
# support the 'aligned' attribute in the way that clang sources requires (for
# any code that uses the LLVM_ALIGNAS macro), so this is must be disabled to
More information about the llvm-commits
mailing list