summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX')
-rw-r--r--clang/test/SemaCXX/struct-class-redecl.cpp8
-rw-r--r--clang/test/SemaCXX/typedef-redecl.cpp2
2 files changed, 8 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/struct-class-redecl.cpp b/clang/test/SemaCXX/struct-class-redecl.cpp
new file mode 100644
index 00000000000..d6ac3661a39
--- /dev/null
+++ b/clang/test/SemaCXX/struct-class-redecl.cpp
@@ -0,0 +1,8 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+class X; // expected-note{{here}}
+typedef struct X * X_t;
+
+template<typename T> class Y;
+template<class U> struct Y { };
+
+union X { int x; float y; }; // expected-error{{use of 'X' with tag type that does not match previous declaration}}
diff --git a/clang/test/SemaCXX/typedef-redecl.cpp b/clang/test/SemaCXX/typedef-redecl.cpp
index 10be77cd1a6..e38f47436d1 100644
--- a/clang/test/SemaCXX/typedef-redecl.cpp
+++ b/clang/test/SemaCXX/typedef-redecl.cpp
@@ -29,5 +29,3 @@ typedef I I;
struct s { };
-typedef class st { /* ... */ } st; // expected-note{{previous use is here}}
-struct st; // expected-error{{use of 'st' with tag type that does not match previous declaration}}
OpenPOWER on IntegriCloud