[llvm-dev] PVS-Studio analysis of LLVM code
Jonas Wagner via llvm-dev
llvm-dev at lists.llvm.org
Tue Nov 1 03:26:21 PDT 2016
I think this is really cool! You've convinced me to try out PVS on some of
my own projects :)
Of all the warnings presented in the article, there was one for which I
thought it's a false positive. By default, LLVM is compiled without RTTI
and exceptions. Because of this, I reasoned that operator new would not
throw an exception, and so the checks of its result against nullptr were
Turns out I'm probably wrong. At least according to this stack overflow post
But then, what is the correct way to use operator new when compiling with
-fno-exceptions? Do we need to add (std::nothrow) to all uses of `new`?
On Mon, Oct 31, 2016 at 6:49 PM Eugene Zelenko via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Company behind PVS-Studio analyzed relatively recent version of LLVM
> and some results are reported in http://www.viva64.com/en/b/0446/.
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev