summaryrefslogtreecommitdiffstats
path: root/clang/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
commitbc12e920681c7bdf6def76c8f833253c4f49183a (patch)
tree7b7af9d07616b0ee6943b4e8594925c46b139864 /clang/test/Sema/struct-cast.c
parentffc6133318f531ae2cf264f0d2d1aa076939f873 (diff)
downloadbcm5719-llvm-bc12e920681c7bdf6def76c8f833253c4f49183a.tar.gz
bcm5719-llvm-bc12e920681c7bdf6def76c8f833253c4f49183a.zip
Use the unqualified type for GCCs struct/union cast extension
llvm-svn: 62170
Diffstat (limited to 'clang/test/Sema/struct-cast.c')
-rw-r--r--clang/test/Sema/struct-cast.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Sema/struct-cast.c b/clang/test/Sema/struct-cast.c
new file mode 100644
index 00000000000..734be804e6e
--- /dev/null
+++ b/clang/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();
+}
OpenPOWER on IntegriCloud