[llvm] c9c1b15 - Re-enable MSVC C4709 diagnostic; NFC (#182514)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 20 09:05:43 PST 2026
Author: Aaron Ballman
Date: 2026-02-20T12:05:39-05:00
New Revision: c9c1b15c66852abd69cf550374755611451197cb
URL: https://github.com/llvm/llvm-project/commit/c9c1b15c66852abd69cf550374755611451197cb
DIFF: https://github.com/llvm/llvm-project/commit/c9c1b15c66852abd69cf550374755611451197cb.diff
LOG: Re-enable MSVC C4709 diagnostic; NFC (#182514)
>From MSDN:
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4709?view=msvc-170
> comma operator within array index expression
This is a useful diagnostic to have enabled in general. It was disabled
in 02e1f1915f94413a64efd295fa3dc63d40046fcf because of false positives,
but those appear to have been resolved. Enabling the diagnostic locally
does not emit any diagnostics.
Added:
Modified:
llvm/cmake/modules/HandleLLVMOptions.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index b8bcd41a0b13f..7507b5ff95e5e 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -764,10 +764,6 @@ if (MSVC)
# 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
- # 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.
More information about the llvm-commits
mailing list