[cfe-commits] [PATCH][Review request] - superfluous scope specifier inside a class definition
Francois Pichet
pichet2000 at gmail.com
Wed Sep 29 01:00:46 PDT 2010
Hi,
This patch deals with superfluous scope specifier inside a class
definition for member functions.
example:
class A {
void A::foo();
};
Currently clang gives this error:
error: out-of-line declaration of a member must be a definition
void A::foo();
~~~^
error: out-of-line definition of 'foo' does not match any declaration in 'A'
void A::foo();
~~~^
2 errors generated.
Not very good error messages since foo is not out-of-line.
With this patch the error will be:
error: extra qualification on member 'foo'
void A::foo();
~~~^
As a bonus, I added a fixit to delete the extra A::
Also the error is downgraded to a warning in Microsoft mode because
the MSVC header files contain such error in a few places. That's why I
got interested by this issue.
My next few patches will deal with Microsoft compiler intrinsic (ex:
__noop). Still not sure how to deal with that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: member_extra_qualif.patch
Type: application/octet-stream
Size: 7722 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100929/f6515396/attachment.obj>
More information about the cfe-commits
mailing list