[clang-tools-extra] 9791416 - Silence a "logical operation on address of string constant" via CMake instead.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 19 08:20:24 PDT 2020


Author: Aaron Ballman
Date: 2020-07-19T11:19:48-04:00
New Revision: 97914164f8454e745219566d58479b5762cccd51

URL: https://github.com/llvm/llvm-project/commit/97914164f8454e745219566d58479b5762cccd51
DIFF: https://github.com/llvm/llvm-project/commit/97914164f8454e745219566d58479b5762cccd51.diff

LOG: Silence a "logical operation on address of string constant" via CMake instead.

Added: 
    

Modified: 
    clang-tools-extra/clangd/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/CMakeLists.txt b/clang-tools-extra/clangd/CMakeLists.txt
index b3002b1d5698..8db6656e5291 100644
--- a/clang-tools-extra/clangd/CMakeLists.txt
+++ b/clang-tools-extra/clangd/CMakeLists.txt
@@ -28,6 +28,10 @@ set(LLVM_LINK_COMPONENTS
   Option
   )
 
+if(MSVC AND NOT CLANG_CL)
+ set_source_files_properties(CompileCommands.cpp PROPERTIES COMPILE_FLAGS -wd4130) # disables C4130: logical operation on address of string constant
+endif()
+
 add_clang_library(clangDaemon
   AST.cpp
   ClangdLSPServer.cpp


        


More information about the cfe-commits mailing list