AccessTarget &Entity) {
assert(Entity.getAccess() != AS_public && "called for public access!");
- if (S.getLangOptions().MicrosoftExt &&
+ if (S.getLangOptions().MicrosoftMode &&
IsMicrosoftUsingDeclarationAccessBug(S, Loc, Entity))
return AR_accessible;
+namespace ms_using_declaration_bug {\r
+\r
+class A {\r
+public: \r
+ int f(); \r
+};\r
+\r
+class B : public A {\r
+private: \r
+ using A::f;\r
+};\r
+\r
+class C : public B { \r
+private: \r
+ using B::f; // expected-warning {{using declaration refers to inaccessible member 'ms_using_declaration_bug::B::f', which refers to accessible member 'ms_using_declaration_bug::A::f', accepted for Microsoft compatibility}}\r
+};\r
+\r
+}\r
+\r
+\r
sh = (short)ptr;
}
-namespace ms_using_declaration_bug {
-
-class A {
-public:
- int f();
-};
-
-class B : public A {
-private:
- using A::f;
-};
-
-class C : public B {
-private:
- using B::f; // expected-warning {{using declaration refers to inaccessible member 'ms_using_declaration_bug::B::f', which refers to accessible member 'ms_using_declaration_bug::A::f', accepted for Microsoft compatibility}}
-};
-
-}
-
-
namespace friend_as_a_forward_decl {