On Thu, Apr 4, 2013 at 1:50 PM, Rafael Espíndola <[email protected]
> wrote:
> > // C99 6.2.2p4: Check if we have a static decl followed by a
> non-static.
> > if (New->getStorageClass() == SC_Static &&
> > - (Old->getStorageClass() == SC_None || Old->hasExternalStorage()))
> {
> > + !New->isStaticDataMember() &&
> > + isExternalLinkage(Old->getLinkage())) {
> >
> > This looks backwards -- is the comment here wrong? The
> 'isStaticDataMember'
> > check looks like it might be unnecessary, since a redeclaration of a
> static
> > data member can't be marked 'static'.
>
> Good catch. I have updated the comment. The reference also looked
> wrong, at least in the C standard draft that I have, so I have changed
> it to point to the c++ one.
>
> The isStaticDataMember is there to avoid producing duplicated errors
> when a redeclaration has the static storage class.
OK, LGTM.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits