[llvm] Re-enable MSVC C4592 diagnostic; NFC (PR #182503)
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 20 09:09:04 PST 2026
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/182503
>From 586b92f96e2159a1ba5022bc4aea19cb353a99a9 Mon Sep 17 00:00:00 2001
From: Aaron Ballman <aaron at aaronballman.com>
Date: Fri, 20 Feb 2026 09:21:06 -0500
Subject: [PATCH 1/2] Re-enable MSVC C4592 diagnostic; NFC
This diagnostic is no longer documented on MSDN, but the diagnostic
text was:
> ''var': symbol will be dynamically initialized (implementation limitation)
This was disabled in 5cbf37fe3703ee7744f864a53df443ab97e29af7 to work
around false positives with MSVC 2015 Update 1. I believe those false
positives have been fixed and this diagnostic no longer needs to be
disabled. Local testing shows it is not emitted.
---
llvm/cmake/modules/HandleLLVMOptions.cmake | 3 ---
1 file changed, 3 deletions(-)
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 122d3aab26e11..8abacbacc6b45 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -754,9 +754,6 @@ if (MSVC)
-wd4805 # Suppress 'unsafe mix of type <type> and type <type> in operation'
-wd4577 # Suppress 'noexcept used with no exception handling mode specified; termination on exception is not guaranteed'
-wd4091 # Suppress 'typedef: ignored on left of '' when no variable is declared'
- # C4592 is disabled because of false positives in Visual Studio 2015
- # Update 1. Re-evaluate the usefulness of this diagnostic with Update 2.
- -wd4592 # Suppress ''var': symbol will be dynamically initialized (implementation limitation)
-wd4319 # Suppress ''operator' : zero extending 'type' to 'type' of greater size'
# C4709 is disabled because of a bug with Visual Studio 2017 as of
# v15.8.8. Re-evaluate the usefulness of this diagnostic when the bug
>From a0f09a749b4f1c122d47467cf4008b4107ad51e3 Mon Sep 17 00:00:00 2001
From: Aaron Ballman <aaron at aaronballman.com>
Date: Fri, 20 Feb 2026 12:08:56 -0500
Subject: [PATCH 2/2] Try that update again
---
llvm/cmake/modules/HandleLLVMOptions.cmake | 7 -------
1 file changed, 7 deletions(-)
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index fb8cf8d2675b7..54a0f4d3ef56b 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -760,13 +760,6 @@ if (MSVC)
-wd4389 # Suppress 'signed/unsigned mismatch'
-wd4805 # Suppress 'unsafe mix of type <type> and type <type> in operation'
-wd4577 # Suppress 'noexcept used with no exception handling mode specified; termination on exception is not guaranteed'
-<<<<<<< aballman-msvc-cmake-warning-4592
- -wd4091 # Suppress 'typedef: ignored on left of '' when no variable is declared'
-=======
- # C4592 is disabled because of false positives in Visual Studio 2015
- # Update 1. Re-evaluate the usefulness of this diagnostic with Update 2.
- -wd4592 # Suppress ''var': symbol will be dynamically initialized (implementation limitation)
->>>>>>> main
-wd4319 # Suppress ''operator' : zero extending 'type' to 'type' of greater size'
# C4709 is disabled because of a bug with Visual Studio 2017 as of
# v15.8.8. Re-evaluate the usefulness of this diagnostic when the bug
More information about the llvm-commits
mailing list