Skip to content

Commit 49878d4

Browse files
committed
[Serialization] Expect unknown/custom attribute in deserializeDeclCommon
Attr can be null here when it's not a compilder-dedined attribute like a custom attribute. rdar://102525437
1 parent 51c5da0 commit 49878d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Serialization/Deserialization.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5306,7 +5306,7 @@ llvm::Error DeclDeserializer::deserializeDeclCommon() {
53065306

53075307
// Do a quick check to see if this attribute is a move only attribute. If
53085308
// so, emit a nice error if we don't have experimental move only enabled.
5309-
if (Attr->getKind() == DeclAttrKind::DAK_MoveOnly &&
5309+
if (Attr && Attr->getKind() == DeclAttrKind::DAK_MoveOnly &&
53105310
!MF.getContext().LangOpts.Features.contains(Feature::MoveOnly)) {
53115311
MF.getContext().Diags.diagnose(
53125312
SourceLoc(),

0 commit comments

Comments
 (0)