CXXMethodDecl* NewMethod = dyn_cast<CXXMethodDecl>(New);
if (OldMethod && NewMethod &&
!OldMethod->isStatic() && !NewMethod->isStatic() &&
- OldQType.getCVRQualifiers() != NewQType.getCVRQualifiers())
+ OldMethod->getTypeQualifiers() != NewMethod->getTypeQualifiers())
return true;
// The signatures match; this is not an overload.
class X {
void f();
void f(int);
-
- // FIXME: can't test this until we can handle const methods.
- // void f() const;
+ void f() const;
void g(int); // expected-error {{error: previous declaration is here}}
void g(int, float); // expected-error {{error: previous declaration is here}}
struct SmartPtr {
int& operator*();
- // FIXME: spurious error: long& operator*() const;
+ long& operator*() const volatile;
};
-void test_smartptr(SmartPtr ptr, const SmartPtr cptr) {
+void test_smartptr(SmartPtr ptr, const SmartPtr cptr,
+ const volatile SmartPtr cvptr) {
int &ir = *ptr;
- // FIXME: reinstate long &lr = *cptr;
+ long &lr = *cptr;
+ long &lr2 = *cvptr;
}