summaryrefslogtreecommitdiff
path: root/tests/headers/bindgen-union-inside-namespace.hpp
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2018-12-02 07:52:17 -0600
committerEmilio Cobos Álvarez <emilio@crisal.io>2018-12-02 08:03:39 -0600
commitc7b28dbcd27656a03d18008f282668b84b234bf6 (patch)
tree9c63ae6ef4679be04bf68c21f9d1dabd8d570b16 /tests/headers/bindgen-union-inside-namespace.hpp
parent7b1406dc90f67fafca61dba915ac57b9d2d7d2d4 (diff)
codegen: Properly detect bindgen unions.
The root cause of the issue was the missing: ``` self.saw_bindgen_union |= new.saw_bindgen_union; ``` But I also cleaned up a bit more and removed the unused saw_union. Fixes #1457
Diffstat (limited to 'tests/headers/bindgen-union-inside-namespace.hpp')
-rw-r--r--tests/headers/bindgen-union-inside-namespace.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/headers/bindgen-union-inside-namespace.hpp b/tests/headers/bindgen-union-inside-namespace.hpp
new file mode 100644
index 00000000..6a7d3a30
--- /dev/null
+++ b/tests/headers/bindgen-union-inside-namespace.hpp
@@ -0,0 +1,8 @@
+// bindgen-flags: --rust-target 1.0 --enable-cxx-namespaces
+
+namespace foo {
+ union Bar {
+ int foo;
+ int bar;
+ };
+}