[llvm] r347345 - Silence C4709 in MSVC because it is buggy.

Aaron Ballman via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 20 12:50:04 PST 2018


Author: aaronballman
Date: Tue Nov 20 12:50:04 2018
New Revision: 347345

URL: http://llvm.org/viewvc/llvm-project?rev=347345&view=rev
Log:
Silence C4709 in MSVC because it is buggy.

The diagnostic will trigger on code that does not have any comma operator, but instead default-constructs an object with an explicitly defaulted constructor as the array index argument.

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=347345&r1=347344&r2=347345&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Tue Nov 20 12:50:04 2018
@@ -513,6 +513,10 @@ 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
 
       # Ideally, we'd like this warning to be enabled, but MSVC 2013 doesn't
       # support the 'aligned' attribute in the way that clang sources requires (for




More information about the llvm-commits mailing list