[PATCH] D149609: Silence warning on MSVC after 5b2423183cb3

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 1 12:33:57 PDT 2023


aganea created this revision.
aganea added reviewers: Everybody0523, yusra.syeda.
Herald added a project: All.
aganea requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This happens when building with latest MSVC 2022. We don't have any bots that run with this compiler.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149609

Files:
  llvm/unittests/Object/CMakeLists.txt


Index: llvm/unittests/Object/CMakeLists.txt
===================================================================
--- llvm/unittests/Object/CMakeLists.txt
+++ llvm/unittests/Object/CMakeLists.txt
@@ -21,3 +21,8 @@
   )
 
 target_link_libraries(ObjectTests PRIVATE LLVMTestingSupport)
+
+if (MSVC)
+  # Disable warning C4309: '=': truncation of constant value
+  set_source_files_properties(GOFFObjectFileTest.cpp PROPERTIES COMPILE_FLAGS -wd4309)
+endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149609.518528.patch
Type: text/x-patch
Size: 454 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230501/396d1d71/attachment.bin>


More information about the llvm-commits mailing list