teemperor added a comment. In D61140#1479111 <https://reviews.llvm.org/D61140#1479111>, @aprantl wrote:
> Could we test this by doing -dump-ast of From and To and FileCheck-ing the > output? +1 for this. Importing a simple record should test this? E.g. something like this: 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..8d1d88c632d --- /dev/null +++ b/clang/test/Import/cxx-record-flags/Inputs/F.cpp @@ -0,0 +1,11 @@ +class FTrivial { + int i; +}; + +void foo(); + +struct FNonTrivial { + FNonTrivial(const FNonTrivial &F) { foo(); } + 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..c51558b4793 --- /dev/null +++ b/clang/test/Import/cxx-record-flags/test.cpp @@ -0,0 +1,15 @@ +// RUN: clang-import-test -dump-ast -import %S/Inputs/F.cpp -expression %s | FileCheck %s + +// CHECK: FTrivial +// CHECK-NEXT: DefinitionData +// CHECK-SAME: pass_in_registers + +// CHECK: FNonTrivial +// CHECK-NEXT: DefinitionData +// 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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits