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.
member_extra_qualif.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
