Disable MSVC's warning about noreturn destructors
authorReid Kleckner <reid@kleckner.net>
Fri, 25 Jan 2013 15:36:13 +0000 (15:36 +0000)
committerReid Kleckner <reid@kleckner.net>
Fri, 25 Jan 2013 15:36:13 +0000 (15:36 +0000)
This warning fires on:
  Operator::~Operator() {
    llvm_unreachable("should never destroy an Operator");
  }

That seems like a false positive.  I don't see any good way to silence
the warning here, so I'm disabling it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173455 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/HandleLLVMOptions.cmake

index 711fe9673733e6e07e7118a24b23460c7a15028b..7b0f4641e1e32e1fb48dc91fae5342446e27b7f2 100644 (file)
@@ -169,6 +169,7 @@ if( MSVC )
     -wd4551 # Suppress 'function call missing argument list'
     -wd4624 # Suppress ''derived class' : destructor could not be generated because a base class destructor is inaccessible'
     -wd4715 # Suppress ''function' : not all control paths return a value'
+    -wd4722 # Suppress ''function' : destructor never returns, potential memory leak'
     -wd4800 # Suppress ''type' : forcing value to bool 'true' or 'false' (performance warning)'
 
     # Promoted warnings.