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

Yaron Keren yaron.keren at gmail.com
Mon Mar 24 14:27:48 PDT 2014


Sure, fine by me to disable it completely and remove the code from both
places.
I'll do this tomorrow,

Yaron



2014-03-24 23:09 GMT+02:00 Aaron Ballman <aaron at aaronballman.com>:

> On Mon, Mar 24, 2014 at 5:05 PM, Chandler Carruth <chandlerc at google.com>
> wrote:
> >
> > 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.
>
> I'd be amenable to disabling this one in CMake. It doesn't seem like
> it'd be a high-value diagnostic compared to the amount of pain working
> around it.
>
> ~Aaron
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140324/b510edd8/attachment.html>


More information about the llvm-commits mailing list