summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/expectations/tests/issue-2239-template-dependent-bit-width.rs19
-rw-r--r--tests/headers/issue-2239-template-dependent-bit-width.hpp10
2 files changed, 29 insertions, 0 deletions
diff --git a/tests/expectations/tests/issue-2239-template-dependent-bit-width.rs b/tests/expectations/tests/issue-2239-template-dependent-bit-width.rs
new file mode 100644
index 00000000..75ec9e43
--- /dev/null
+++ b/tests/expectations/tests/issue-2239-template-dependent-bit-width.rs
@@ -0,0 +1,19 @@
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
+
+#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct b {
+ pub _address: u8,
+}
+pub type b_td<a> = a;
+pub type b_ta<a> = a;
+#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct b_foo {
+ pub _address: u8,
+}
diff --git a/tests/headers/issue-2239-template-dependent-bit-width.hpp b/tests/headers/issue-2239-template-dependent-bit-width.hpp
new file mode 100644
index 00000000..4e6feb3f
--- /dev/null
+++ b/tests/headers/issue-2239-template-dependent-bit-width.hpp
@@ -0,0 +1,10 @@
+template <class a> class b {
+ typedef a td;
+ using ta = a;
+ struct foo {
+ a foo : sizeof(a);
+ a : sizeof(a);
+ td : sizeof(td);
+ ta : sizeof(ta);
+ };
+};