[cfe-commits] r112335 - /cfe/trunk/test/SemaCXX/return-noreturn.cpp

Chandler Carruth chandlerc at google.com
Fri Jan 7 01:07:47 PST 2011


Sorry for the flurry of emails... I got interested in this.

On Thu, Jan 6, 2011 at 11:09 PM, Chandler Carruth <chandlerc at google.com>wrote:

> I tried just turning on the implicit dtor support in the CFGBuilder, since
> we actually have at least some support for it now, and indeed that made all
> of the warnings in this file go away, but it did very very bad things to the
> unreachable code warning test, so I fear the explosion in CFG size is just
> too much.


So, I thought this was just the CFG size, but when it didn't finish after
quite some time, I started to think bug. Turns out it was a pretty trivial
inf-loop in the -Wunreachable-code implementation. I've attached a patch
that both fixes the inf-loop, and turns on implicit destructor CFG elements
(as well as initialzers), completely fixing these issues. It survived the
test suite, and running over some large codebases.

I've done some initial benchmarking on the all-std-headers.cpp file, as well
as two very large C++ files from our codebase, and I'm seeing little to no
impact, any measurements come out below 1%, and into the noise floor.

Does this look viable to you?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110107/7268887e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-noreturn-dtors.patch
Type: application/octet-stream
Size: 2625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110107/7268887e/attachment.obj>


More information about the cfe-commits mailing list