[PATCH] Add new warning to Clang to detect when all code paths in a function has a call back to the function.

Jordan Rose jordan_rose at apple.com
Wed Nov 13 09:45:23 PST 2013


On Nov 12, 2013, at 22:46 , Richard Smith <richard at metafoo.co.uk> wrote:

> The important question is what's the timing difference between: -Wuninitialized -Wyour-new-warning and just -Wuninitialized
> 
> That way you won't be comparing the timing of CFG building and no CFG building, but CFG building with your warning and CFG building without your warning.
> 
> Right. If this warning doesn't add measurable compile time in a build that's already constructing CFGs, then that's OK, but it needs to be off by default, like the other CFG-based warnings.
> 

…which raises the point: should we have a -Wflow-sensitive-analysis for “all current and future CFG-based checks”? I have the usual discoverability concerns, but having a warning flag that means “warnings that would be on by default if we could get a CFG for free” seems like a way to ameliorate that issue.

Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131113/1090781c/attachment.html>


More information about the cfe-commits mailing list