diff options
Diffstat (limited to 'test/Import/local-struct-use-origins')
-rw-r--r-- | test/Import/local-struct-use-origins/Inputs/Callee.cpp | 12 | ||||
-rw-r--r-- | test/Import/local-struct-use-origins/test.cpp | 7 |
2 files changed, 19 insertions, 0 deletions
diff --git a/test/Import/local-struct-use-origins/Inputs/Callee.cpp b/test/Import/local-struct-use-origins/Inputs/Callee.cpp new file mode 100644 index 000000000000..96cd2f22e493 --- /dev/null +++ b/test/Import/local-struct-use-origins/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/test/Import/local-struct-use-origins/test.cpp b/test/Import/local-struct-use-origins/test.cpp new file mode 100644 index 000000000000..abbdbd16d022 --- /dev/null +++ b/test/Import/local-struct-use-origins/test.cpp @@ -0,0 +1,7 @@ +// RUN: clang-import-test -dump-ir -use-origins -import %S/Inputs/Callee.cpp -expression %s | FileCheck %s +// CHECK: %struct.S = type { i +// CHECK: %struct.S.0 = type { i + +void foo() { + return Bar().bar(3, true); +} |