summaryrefslogtreecommitdiff
path: root/test/SemaCXX/MicrosoftCompatibility.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/MicrosoftCompatibility.cpp')
-rw-r--r--test/SemaCXX/MicrosoftCompatibility.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/SemaCXX/MicrosoftCompatibility.cpp b/test/SemaCXX/MicrosoftCompatibility.cpp
index 05037ac6a0d0..fb7d9751d1a5 100644
--- a/test/SemaCXX/MicrosoftCompatibility.cpp
+++ b/test/SemaCXX/MicrosoftCompatibility.cpp
@@ -3,6 +3,7 @@
typedef unsigned short char16_t;
typedef unsigned int char32_t;
+struct _Atomic {};
typename decltype(3) a; // expected-warning {{expected a qualified name after 'typename'}}
@@ -21,6 +22,12 @@ void test()
}
+namespace ms_predefined_types {
+ // ::type_info is a built-in forward class declaration.
+ void f(const type_info &a);
+ void f(size_t);
+}
+
namespace ms_protected_scope {
struct C { C(); };
@@ -105,6 +112,9 @@ public:
class B : public A {
private:
using A::f;
+ void g() {
+ f(); // no diagnostic
+ }
};
class C : public B {
@@ -114,6 +124,27 @@ private:
}
+namespace using_tag_redeclaration
+{
+ struct S;
+ namespace N {
+ using ::using_tag_redeclaration::S;
+ struct S {}; // expected-note {{previous definition is here}}
+ }
+ void f() {
+ N::S s1;
+ S s2;
+ }
+ void g() {
+ struct S; // expected-note {{forward declaration of 'S'}}
+ S s3; // expected-error {{variable has incomplete type 'S'}}
+ }
+ void h() {
+ using ::using_tag_redeclaration::S;
+ struct S {}; // expected-error {{redefinition of 'S'}}
+ }
+}
+
namespace MissingTypename {