[cfe-dev] [cfe-commits] [PATCH] Re: Interest in a -Wusing-namespace-in-headers?

Elliot Glaysher (Chromium) erg at chromium.org
Wed Mar 23 12:22:11 PDT 2011


On Sat, Mar 19, 2011 at 3:55 PM, Douglas Gregor <dgregor at apple.com> wrote:
> On Mar 19, 2011, at 3:27 AM, Sebastian Redl <sebastian.redl at getdesigned.at> wrote:
>> Do we want to warn about this?
>>
>> extern "C++" {
>>  using namespace foo;
>> }
>>
>> Because the fact that extern blocks are decl contexts has bitten me before, and the above suggestion would fall prey to the same issue.
>
> Good point! Yes, we do want to warn about that.

Is the attached patch sufficient, or are there other cases I should be
checking for?

-- Elliot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: using-namespace-4.diff
Type: text/x-patch
Size: 1723 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110323/96a25838/attachment.bin>


More information about the cfe-dev mailing list