[PATCH] D61140: Copy Argument Passing Restrictions setting when importing a CXXRecordDecl definition
Raphael Isemann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 25 12:22:44 PDT 2019
teemperor added a comment.
Sorry, that test case actually was a bit too complicated. This seems to work:
diff --git a/clang/test/Import/cxx-record-flags/Inputs/F.cpp b/clang/test/Import/cxx-record-flags/Inputs/F.cpp
new file mode 100644
index 00000000000..1294c67f68d
--- /dev/null
+++ b/clang/test/Import/cxx-record-flags/Inputs/F.cpp
@@ -0,0 +1,9 @@
+class FTrivial {
+ int i;
+};
+
+struct FNonTrivial {
+ virtual ~FNonTrivial() = default;
+ int i;
+};
+
diff --git a/clang/test/Import/cxx-record-flags/test.cpp b/clang/test/Import/cxx-record-flags/test.cpp
new file mode 100644
index 00000000000..bff76274fba
--- /dev/null
+++ b/clang/test/Import/cxx-record-flags/test.cpp
@@ -0,0 +1,14 @@
+// RUN: clang-import-test -dump-ast -import %S/Inputs/F.cpp -expression %s | FileCheck %s
+
+// CHECK: FTrivial
+// CHECK: DefinitionData
+// CHECK-SAME: pass_in_registers
+
+// CHECK: FNonTrivial
+// CHECK-NOT: pass_in_registers
+// CHECK: DefaultConstructor
+
+void expr() {
+ FTrivial f1;
+ FNonTrivial f2;
+}
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61140/new/
https://reviews.llvm.org/D61140
More information about the cfe-commits
mailing list