[llvm] r204659 - In Release modes, Visual Studio complains that the Operator destructor in User.cpp

Chandler Carruth chandlerc at google.com
Mon Mar 24 14:05:39 PDT 2014


On Mon, Mar 24, 2014 at 12:48 PM, Yaron Keren <yaron.keren at gmail.com> wrote:

> +#if defined(_MSC_VER)
> +// In Release modes, Visual Studio complains that the Operator destructor
> +// never returns, which is true by design.
> +// This does *not* depend on llvm_unreachable being dependent on NDEBUG:
> +// even if llvm_unreachable is replaced by __assume(false), VC still
> warns in
> +// Release modes but not in Debug modes. The real reason is optimization
> flags.
> +// With /Od in Debug modes the warning is not issued whereas with /O1 it
> is.
> +// I could not find any documentation to this effect, it is reproducable:
> +// Try compiling
> http://msdn.microsoft.com/en-us/library/khwfyc5d(v=vs.90).aspx
> +// with /O1 and then with /Od.
> +// Anyhow, solution is same as lib/Support/Process.cpp:~self_process().
> +
> +#pragma warning(push)
> +#pragma warning(disable:4722)
>

Is this warning providing any value at all? I wonder if we should just
disable it in cmake as low value. The fundamental error is well covered by
Clang's existing warnings.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140324/7e5ed6d5/attachment.html>


More information about the llvm-commits mailing list