Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/swift-5.1-branch' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
swift-ci committed May 8, 2019
2 parents 9bffb9a + 14f814d commit 81b4284
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/AST/ASTImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1798,6 +1798,9 @@ Error ASTNodeImporter::ImportDefinition(
ToData.HasDeclaredCopyAssignmentWithConstParam
= FromData.HasDeclaredCopyAssignmentWithConstParam;

// Copy over the data stored in RecordDeclBits
ToCXX->setArgPassingRestrictions(FromCXX->getArgPassingRestrictions());

SmallVector<CXXBaseSpecifier *, 4> Bases;
for (const auto &Base1 : FromCXX->bases()) {
ExpectedType TyOrErr = import(Base1.getType());
Expand Down
9 changes: 9 additions & 0 deletions test/Import/cxx-record-flags/Inputs/F.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class FTrivial {
int i;
};

struct FNonTrivial {
virtual ~FNonTrivial() = default;
int i;
};

14 changes: 14 additions & 0 deletions test/Import/cxx-record-flags/test.cpp
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 81b4284

Please sign in to comment.