[cfe-commits] patch: improve two-phase lookup failure diagnostic

Richard Smith richard at metafoo.co.uk
Mon Nov 12 17:42:49 PST 2012


On Mon, Nov 12, 2012 at 5:12 PM, David Blaikie <dblaikie at gmail.com> wrote:
> On Mon, Nov 12, 2012 at 3:58 PM, Nick Lewycky <nlewycky at google.com> wrote:
>> Clang has a nice diagnostic for failing two-phase name lookup which will,
>> when appropriate, suggest moving a function into one of the associated
>> namespaces. It's smart enough to filter out namespace 'std', and this patch
>> adds filtering for names with '__' anywhere in them. This is good for us
>> libstdc++ users who find that lots of standard types are associated with
>> __gnu_cxx.
>
> Would it be worth implementing the other cases in 17.6.4.3.2? (names
> starting with an underscore then a capital and names beginning with an
> underscore in the global namespace)

I think it's OK to be pragmatic here; if we see a standard library
using those names for namespaces, we can add that check too.



More information about the cfe-commits mailing list