[patch] Fix pr14958 by using lexical contexts

Richard Smith richard at metafoo.co.uk
Fri May 3 11:06:02 PDT 2013


On Fri, May 3, 2013 at 7:40 AM, Rafael EspĂ­ndola <rafael.espindola at gmail.com
> wrote:

> I am not sure if the language linkage checks should use lexical or
> semantic contexts. If lexical, this patch fixes pr14958.


It should be lexical. Linkage specification declarations do not introduce a
scope, and the relevant rule is which innermost linkage specification an
entity is "declared within", which is a lexical notion (see [dcl.link]p4).

Patch LGTM. Have you looked for the same bug in other places where we check
the language linkage?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130503/78f0efe7/attachment.html>


More information about the cfe-commits mailing list