From 57c911e4ab8933d3305660c87221839acbd9021f Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 31 Oct 2014 22:55:57 +0000 Subject: [PATCH] Suppress MSVC's equivalent of -Wshadow warnings IMO we need to clean up some of these, but the member variable one (C4458) has false positives on static methods. It is currently firing on Twine, which has a static method like: struct Twine { uintptr_t LHS, RHS; static void staticMethod() { // warning C4458: declaration of 'LHS' hides class member uintptr_t LHS; ... } }; We should fix up clang's -Wshadow and clean it up, and then we can re-enable some of these MSVC warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221012 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/modules/HandleLLVMOptions.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index 90d766a4fb6..3e0d9b075ae 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -243,6 +243,10 @@ if( MSVC ) -wd4345 # Suppress 'behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized' -wd4351 # Suppress 'new behavior: elements of array 'array' will be default initialized' -wd4355 # Suppress ''this' : used in base member initializer list' + -wd4456 # Suppress 'declaration of 'var' hides local variable' + -wd4457 # Suppress 'declaration of 'var' hides function parameter' + -wd4458 # Suppress 'declaration of 'var' hides class member' + -wd4459 # Suppress 'declaration of 'var' hides global declaration' -wd4503 # Suppress ''identifier' : decorated name length exceeded, name was truncated' -wd4624 # Suppress ''derived class' : destructor could not be generated because a base class destructor is inaccessible' -wd4722 # Suppress 'function' : destructor never returns, potential memory leak -- 2.34.1