[cfe-commits] [PATCH] Assert that redeclarations have the same linkage.
Rafael EspĂndola
rafael.espindola at gmail.com
Wed Dec 26 22:03:45 PST 2012
> For example, in
>
> extern "C" {
> namespace {
> extern int x2;
> }
> }
> namespace {
> int x2;
> }
>
> Should Var->getDeclContext()->isExternCContext() return true for the second
> decl?
I figured that the contexts should probably remain different given
that it is used to test if a decl is out of line. I have implemented
checking for incompatible language linkages and now the extra
asserting should not cause any crashes.
A new patch is attached.
Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 8250 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121227/2333e221/attachment.obj>
More information about the cfe-commits
mailing list