Move most of the checking from ActOnCXXMemberDeclarator to other, more general routines. This is a step toward separating the checking logic from Declarators, which in turn is required for template instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66734 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/virtuals.cpp b/test/SemaCXX/virtuals.cpp
index 6cbf3ef..ad82edd 100644
--- a/test/SemaCXX/virtuals.cpp
+++ b/test/SemaCXX/virtuals.cpp
@@ -8,10 +8,15 @@
void i() = 1; // expected-error {{initializer on function does not look like a pure-specifier}}
void j() = 0u; // expected-error {{initializer on function does not look like a pure-specifier}}
+
+ void k();
+
public:
A(int);
};
+virtual void A::k() { } // expected-error{{'virtual' can only be specified inside the class definition}}
+
class B : public A {
// Needs to recognize that overridden function is virtual.
//void g() = 0;