[cfe-commits] r93500 - /cfe/trunk/lib/Sema/SemaDecl.cpp

Daniel Dunbar daniel at zuster.org
Tue Jan 19 09:37:39 PST 2010


On Thu, Jan 14, 2010 at 7:18 PM, Mike Stump <mrs at apple.com> wrote:
> On Jan 14, 2010, at 6:43 PM, Chris Lattner wrote:
>> On Jan 14, 2010, at 6:06 PM, Mike Stump wrote:
>>
>>> Author: mrs
>>> Date: Thu Jan 14 20:06:42 2010
>>> New Revision: 93500
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=93500&view=rev
>>> Log:
>>> Refine unreachable warnings.  WIP.
>>
>> How does it refine it?
>
> We avoid issuing warnings for code that can be reached from other code that itself is dead, and when we report on dead loops, we try and select a better location to report.  Better means, as close to the top of the file as we can, giving preference to the main source file over other files, and any file over system headers.
>
>> Testcase?
>
> Checked one in r93503.
>
>> Also, the codesize for std::sort is quite high, is it needed?  Why are you sorting based on locations?
>
>
> When there are multiple dead locations inside a single function, the sort helps ensure a more sane ordering to the produced diagnostics.  I didn't think randomly jumping back and forth had quite the polish I was looking for.  If the diagnostic subsystem buffered and selected an ordering, we wouldn't have to buffer or sort them here.

Can it use array_pod_sort?

 - Daniel

> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>




More information about the cfe-commits mailing list