aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/struct-cast.c
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-01-13 17:00:51 +0000
committerAnders Carlsson <andersca@mac.com>2009-01-13 17:00:51 +0000
commit53859912e4b5c4493e28c9ead8d634fdaac6adaf (patch)
treec833af9599a4269e97878ca0aeac08465176fe37 /test/Sema/struct-cast.c
parent9b9ca01ff3136a7539dc08a4c4e1a3dd8c8d3a7d (diff)
Use the unqualified type for GCCs struct/union cast extension
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62170 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/struct-cast.c')
-rw-r--r--test/Sema/struct-cast.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Sema/struct-cast.c b/test/Sema/struct-cast.c
new file mode 100644
index 0000000000..734be804e6
--- /dev/null
+++ b/test/Sema/struct-cast.c
@@ -0,0 +1,14 @@
+// RUN: clang -fsyntax-only %s -verify
+
+struct S {
+ int one;
+ int two;
+};
+
+struct S const foo(void);
+
+struct S tmp;
+
+void priv_sock_init() {
+ tmp = (struct S)foo();
+}