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

Elliot Glaysher (Chromium) erg at chromium.org
Fri Mar 25 11:30:49 PDT 2011


On Fri, Mar 25, 2011 at 9:40 AM, Peter Collingbourne <peter at pcc.me.uk> wrote:
> I believe the correct thing to do is to iterate through
> declaration context parents until you reach something that is not a
> LinkageSpecDecl, and warn if it is a TranslationUnitDecl.

Is something like the attached closer to what you want? This new
version recursively walks up the DeclContext chain, and I've
integrated all the examples I've seen in this thread into the tests.

-- Elliot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: using-namespace-5.diff
Type: text/x-patch
Size: 2852 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110325/ed9a877f/attachment.bin>


More information about the cfe-commits mailing list