In Parser::ParseCXXClassMemberDeclaration(), it was possible to change
isAccessDecl = NextToken().is(tok::kw_operator);
to
isAccessDecl = false;
and no tests would fail. Now there's coverage for this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217519
91177308-0d34-0410-b5e6-
96231b3b80d8
#endif
}
-struct S { int n; };
+struct S { int n; void operator+(int); };
struct T : private S {
S::n;
#if __cplusplus < 201103L
// expected-warning@-2 {{access declarations are deprecated; use using declarations instead}}
#else
// expected-error@-4 {{ISO C++11 does not allow access declarations; use using declarations instead}}
+#endif
+ S::operator+;
+#if __cplusplus < 201103L
+ // expected-warning@-2 {{access declarations are deprecated; use using declarations instead}}
+#else
+ // expected-error@-4 {{ISO C++11 does not allow access declarations; use using declarations instead}}
#endif
};