[cfe-dev] -Wunreachable-code and templates

David Blaikie dblaikie at gmail.com
Tue Jan 10 08:49:20 PST 2012

On Tue, Jan 10, 2012 at 8:37 AM, Christopher Jefferson
<chris at bubblescope.net> wrote:
> On 10 Jan 2012, at 08:20, David Blaikie wrote:
>> Is there a particular technique/suite/process I should use to try to
>> measure the possible performance regression of performing reachable
>> code analysis on all templates? (of course I may need to come up with
>> my own test cases using the STL and/or boost to really grind things a
>> bit)
> As an experiment, I tried your most recent patch with a selection of boost headers, in particular the file below. This lead to the following segfault when I tried -Wunreachable-code (which did not occur with -Wunreachable-code, or with an unpatched clang with or without -Wunreachable-code). I can work on reducing this down to a smaller test case, but my past experience is that this is a pain with boost, so I will only do it if you would make use of it.

It might not actually be too bad - I've reduced some pretty strange
test cases by manual divide+conquer before. But I'll save you the
hassle & look at this myself, probably. Thanks for trying it &
providing the test case. If I have trouble reproducing or
investigating it I'll get back to you.

- David

More information about the cfe-dev mailing list