[cfe-dev] Clang Analysis of several open source projects.
Ted Kremenek
kremenek at apple.com
Fri May 13 12:35:25 PDT 2011
On May 13, 2011, at 12:24 AM, Erik Cederstrand wrote:
> I created a bug report some time ago http://llvm.org/bugs/show_bug.cgi?id=8914 I realize that fixing this is non-trivial, but it would be nice if the analyzer could at least handle the following:
>
> if foo():
> x = 5
> else:
> exit()
> bar(x)
>
> without complaining that x might be uninitialized.
It's likely that 'exit' doesn't have a noreturn attribute. Adding that would not only make the compiler codegen better but also would prune tell the analyzer to prune out this path.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110513/e2c363b5/attachment.html>
More information about the cfe-dev
mailing list