Skip to content

Commit ec565cd

Browse files
committed
AST: initialize LazySemanticInfo struct to 0 instead of setting all fields to false
1 parent 9805983 commit ec565cd

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

include/swift/AST/Decl.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2343,7 +2343,7 @@ class ValueDecl : public Decl {
23432343
/// Whether this declaration is 'final'. A final class can't be subclassed,
23442344
/// a final class member can't be overriden.
23452345
unsigned isFinal : 1;
2346-
} LazySemanticInfo;
2346+
} LazySemanticInfo = { };
23472347

23482348
friend class OverriddenDeclsRequest;
23492349
friend class IsObjCRequest;
@@ -2358,14 +2358,6 @@ class ValueDecl : public Decl {
23582358
Bits.ValueDecl.AlreadyInLookupTable = false;
23592359
Bits.ValueDecl.CheckedRedeclaration = false;
23602360
Bits.ValueDecl.IsUserAccessible = true;
2361-
LazySemanticInfo.isObjCComputed = false;
2362-
LazySemanticInfo.isObjC = false;
2363-
LazySemanticInfo.hasOverriddenComputed = false;
2364-
LazySemanticInfo.hasOverridden = false;
2365-
LazySemanticInfo.isDynamicComputed = false;
2366-
LazySemanticInfo.isDynamic = false;
2367-
LazySemanticInfo.isFinalComputed = false;
2368-
LazySemanticInfo.isFinal = false;
23692361
}
23702362

23712363
// MemberLookupTable borrows a bit from this type

0 commit comments

Comments
 (0)