llvm.org GIT mirror llvm / d8ceb27
Disable Visual C++ warning 4722 about aborting a destructor, it has no value for us. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204704 91177308-0d34-0410-b5e6-96231b3b80d8 Yaron Keren 6 years ago
3 changed file(s) with 2 addition(s) and 34 deletion(s). Raw diff Collapse all Expand all
255255 -wd4180 # Suppress 'qualifier applied to function type has no meaning; ignored'
256256 -wd4244 # Suppress ''argument' : conversion from 'type1' to 'type2', possible loss of data'
257257 -wd4267 # Suppress ''var' : conversion from 'size_t' to 'type', possible loss of data'
258 -wd4291 # Suppress ''declaration' : no matching operator delete found; memory will not be freed if initialization throws an exception'
258259 -wd4345 # Suppress 'behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized'
259260 -wd4351 # Suppress 'new behavior: elements of array 'array' will be default initialized'
260261 -wd4355 # Suppress ''this' : used in base member initializer list'
261262 -wd4503 # Suppress ''identifier' : decorated name length exceeded, name was truncated'
262263 -wd4624 # Suppress ''derived class' : destructor could not be generated because a base class destructor is inaccessible'
264 -wd4722 # Suppress 'function' : destructor never returns, potential memory leak
263265 -wd4800 # Suppress ''type' : forcing value to bool 'true' or 'false' (performance warning)'
264 -wd4291 # Suppress ''declaration' : no matching operator delete found; memory will not be freed if initialization throws an exception'
265266
266267 # Promoted warnings.
267268 -w14062 # Promote 'enumerator in switch of enum is not handled' to level 1 warning.
8282 // Operator Class
8383 //===----------------------------------------------------------------------===//
8484
85 #if defined(_MSC_VER)
86 // In Release modes, Visual Studio complains that the Operator destructor
87 // never returns, which is true by design.
88 // This does *not* depend on llvm_unreachable being dependent on NDEBUG:
89 // even if llvm_unreachable is replaced by __assume(false), VC still warns in
90 // Release modes but not in Debug modes. The real reason is optimization flags.
91 // With /Od in Debug modes the warning is not issued whereas with /O1 it is.
92 // I could not find any documentation to this effect, it is reproducable:
93 // Try compiling http://msdn.microsoft.com/en-us/library/khwfyc5d(v=vs.90).aspx
94 // with /O1 and then with /Od.
95 // Anyhow, solution is same as lib/Support/Process.cpp:~self_process().
96
97 #pragma warning(push)
98 #pragma warning(disable:4722)
99 #endif
100
10185 Operator::~Operator() {
10286 llvm_unreachable("should never destroy an Operator");
10387 }
10488
105 #if defined(_MSC_VER)
106 #pragma warning(pop)
107 #endif
108
10989 } // End llvm namespace
3333 return SP;
3434 }
3535
36 #if defined(_MSC_VER)
37 // Visual Studio complains that the self_process destructor never exits. This
38 // doesn't make much sense, as that's the whole point of calling abort... Just
39 // silence this warning.
40 #pragma warning(push)
41 #pragma warning(disable:4722)
42 #endif
43
4436 // The destructor for the self_process subclass must never actually be
4537 // executed. There should be at most one instance of this class, and that
4638 // instance should live until the process terminates to avoid the potential for
7466 }
7567
7668
77 #if defined(_MSC_VER)
78 #pragma warning(pop)
79 #endif
80
81
8269 #define COLOR(FGBG, CODE, BOLD) "\033[0;" BOLD FGBG CODE "m"
8370
8471 #define ALLCOLORS(FGBG,BOLD) {\