Hi,
Does your patch correct the behavior for this case too?
extern "C" { namespace N { int f(); } }
extern "C" void f();
using namespace N;
void g() { f(); }
(AFAICS, it won't, because the context for the first 'f' isn't a
LinkageDecl nor a function or method.) It seems like we want to add
*all* extern "C" declarations to the "LocallyScopedExternCDecls" map,
which makes me think we have the wrong representation.
On Mon, Dec 10, 2012 at 4:48 AM, Joey Gouly <[email protected]> wrote:
> Sorry, I attached an older version, this is the latest with an updated test
> case.
>
> Thanks,
> Joey
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Joey Gouly
> Sent: 10 December 2012 11:53
> To: [email protected]; [email protected]
> Subject: [cfe-commits] [PATCH] PR12299: Fix overload resolution for extern C
>
> Hi Richard et al,
>
> This patch fixes PR12299, by allowing MergeFunctionDecl to merge functions
> marked with extern "C".
> This is from 7.3.4.6 and 7.3.5 from the n3337 standard.
>
> Does this look like a reasonable fix?
>
> Thanks,
> Joey
>
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits