[cfe-dev] [analyzer] introducing exceptions checkers
Gábor Horváth via cfe-dev
cfe-dev at lists.llvm.org
Sun Sep 6 13:42:05 PDT 2015
Hi!
Thank you for working on the static analyzer! I have one high level comment
though. The noexcept or throw() does not mean that a function can not
contain a throw expression. It means that an exception can not leak out
from that function. So it is perfectly valid to throw an exception and
catch it (without rethrowing it) within a noexcept function. This is
something that you might want to consider (in a future version).
Regards,
Gabor
On 6 September 2015 at 22:08, Kirill Bobyrev via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> I've done the initial version of exceptions checkers from the potential
> checkers list <http://clang-analyzer.llvm.org/potential_checkers.html>. I
> actually found *exceptions.ThrowSpecButNotThrow* and
> *exceptions.NoThrowSpecButThrows* very similar and decided to put them
> together into *exceptions.ExceptionSpec*. It checks for "throw calls" in
> functions specified as noexcept and functions, which do not have "throw
> calls" but should have such calls inside them by declaration.
>
> The first version of checker is attached. I wonder if it's good enough and
> I can push it for the review.
>
> Feedback and suggestions highly appreciated!
>
> --
> Kirill Bobyrev
> https://github.com/omtcyf0
> noe
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150906/00233b98/attachment.html>
More information about the cfe-dev
mailing list