Skip to content

Commit 821065f

Browse files
committed
Remove some now unnecessary calls to setAddedImplicitInitializers
Now that implicit struct initializers are done though requests, there's no need to set the AddedImplicitInitializers bit for them.
1 parent 961c16a commit 821065f

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

lib/ClangImporter/ImportDecl.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2726,7 +2726,6 @@ namespace {
27262726
auto Loc = Impl.importSourceLoc(decl->getLocation());
27272727
auto structDecl = Impl.createDeclWithClangNode<StructDecl>(decl,
27282728
AccessLevel::Public, Loc, name, Loc, None, nullptr, dc);
2729-
structDecl->setAddedImplicitInitializers();
27302729

27312730
auto options = getDefaultMakeStructRawValuedOptions();
27322731
options |= MakeStructRawValuedFlags::MakeUnlabeledValueInit;
@@ -2775,7 +2774,6 @@ namespace {
27752774
C.getProtocol(KnownProtocolKind::ErrorCodeProtocol))) {
27762775
// Create the wrapper struct.
27772776
errorWrapper = new (C) StructDecl(loc, name, loc, None, nullptr, dc);
2778-
errorWrapper->setAddedImplicitInitializers();
27792777
errorWrapper->setAccess(AccessLevel::Public);
27802778
errorWrapper->getAttrs().add(
27812779
new (Impl.SwiftContext) FrozenAttr(/*IsImplicit*/true));
@@ -3203,7 +3201,6 @@ namespace {
32033201
name,
32043202
Impl.importSourceLoc(decl->getLocation()),
32053203
None, nullptr, dc);
3206-
result->setAddedImplicitInitializers();
32073204
Impl.ImportedDecls[{decl->getCanonicalDecl(), getVersion()}] = result;
32083205

32093206
// FIXME: Figure out what to do with superclasses in C++. One possible
@@ -5484,7 +5481,6 @@ SwiftDeclConverter::importSwiftNewtype(const clang::TypedefNameDecl *decl,
54845481

54855482
auto structDecl = Impl.createDeclWithClangNode<StructDecl>(
54865483
decl, AccessLevel::Public, Loc, name, Loc, None, nullptr, dc);
5487-
structDecl->setAddedImplicitInitializers();
54885484

54895485
// Import the type of the underlying storage
54905486
auto storedUnderlyingType = Impl.importTypeIgnoreIUO(
@@ -5760,7 +5756,6 @@ SwiftDeclConverter::importAsOptionSetType(DeclContext *dc, Identifier name,
57605756
// Create a struct with the underlying type as a field.
57615757
auto structDecl = Impl.createDeclWithClangNode<StructDecl>(
57625758
decl, AccessLevel::Public, Loc, name, Loc, None, nullptr, dc);
5763-
structDecl->setAddedImplicitInitializers();
57645759

57655760
makeStructRawValued(Impl, structDecl, underlyingType,
57665761
{KnownProtocolKind::OptionSet});

0 commit comments

Comments
 (0)