[llvm] r204659 - In Release modes, Visual Studio complains that the Operator destructor in User.cpp
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
> +// With /Od in Debug modes the warning is not issued whereas with /O1 it
> +// I could not find any documentation to this effect, it is reproducable:
> +// Try compiling
> +// 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...
More information about the llvm-commits