[cfe-commits] [Patch] New warning for scopes that start in one file and end in another.

Matt Beaumont-Gay matthewbg at google.com
Thu Feb 16 08:31:50 PST 2012


On Thu, Feb 16, 2012 at 02:46, Sebastian Redl
<sebastian.redl at getdesigned.at> wrote:
>
> On 16.02.2012, at 08:11, Matt Beaumont-Gay wrote:
>
>> On Wed, Feb 15, 2012 at 20:47, Eli Friedman <eli.friedman at gmail.com> wrote:
>>> Mechanically, the patch looks fine...
>>>
>>> What sort of testing have you done with this patch?  Has this caught
>>> any interesting issues in existing code?  If not, why is this warning
>>> useful?  Any false positives we should be aware of?
>>
>> I imagine that this will not have a lot of hits on checked-in code.
>> However, I can see it being very useful during development, e.g. when
>> you forget to close a namespace at the bottom of a header file.
>
> But you'd most likely get an error anyway, complaining about unmatched braces.

Maybe, maybe not -- failing to close a namespace can cause a lot of
cascading errors, which could easily hit -ferror-limit.

-Matt




More information about the cfe-commits mailing list