aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/anonymous-union.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/anonymous-union.cpp')
-rw-r--r--test/SemaCXX/anonymous-union.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/SemaCXX/anonymous-union.cpp b/test/SemaCXX/anonymous-union.cpp
index 5f84bcca28db..553ae658e53b 100644
--- a/test/SemaCXX/anonymous-union.cpp
+++ b/test/SemaCXX/anonymous-union.cpp
@@ -155,3 +155,23 @@ namespace test4 {
(void) a.us1; // expected-error {{private member}}
}
}
+
+typedef void *voidPtr;
+
+void f2() {
+ union { int **ctxPtr; void **voidPtr; };
+}
+
+void foo_PR6741() {
+ union {
+ char *m_a;
+ int *m_b;
+ };
+
+ if(1) {
+ union {
+ char *m_a;
+ int *m_b;
+ };
+ }
+}