summaryrefslogtreecommitdiffstats
path: root/clang/test/Import/local-struct
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Import/local-struct')
-rw-r--r--clang/test/Import/local-struct/Inputs/Callee.cpp12
-rw-r--r--clang/test/Import/local-struct/test.cpp8
2 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/Import/local-struct/Inputs/Callee.cpp b/clang/test/Import/local-struct/Inputs/Callee.cpp
new file mode 100644
index 00000000000..96cd2f22e49
--- /dev/null
+++ b/clang/test/Import/local-struct/Inputs/Callee.cpp
@@ -0,0 +1,12 @@
+struct Bar {
+ void bar(int _a, bool _b) {
+ {
+ struct S { int a; };
+ S s = { _a };
+ }
+ {
+ struct S { bool b; };
+ S t = { _b };
+ }
+ };
+};
diff --git a/clang/test/Import/local-struct/test.cpp b/clang/test/Import/local-struct/test.cpp
new file mode 100644
index 00000000000..8f6e38138f2
--- /dev/null
+++ b/clang/test/Import/local-struct/test.cpp
@@ -0,0 +1,8 @@
+// RUN: clang-import-test -dump-ir -import %S/Inputs/Callee.cpp -expression %s | FileCheck %s
+// XFAIL: *
+// CHECK: %struct.S = type { i
+// CHECK: %struct.S.0 = type { i1 }
+
+void foo() {
+ return Bar().bar(3, true);
+}
OpenPOWER on IntegriCloud