@@ -233,6 +233,8 @@ static StringRef getKeyContent(SDKContext &Ctx, KeyKind Kind) {
233
233
#define KEY (NAME ) case KeyKind::KK_##NAME: return Ctx.buffer(#NAME);
234
234
#include " DigesterEnums.def"
235
235
}
236
+
237
+ llvm_unreachable (" Unhandled KeyKind in switch." );
236
238
}
237
239
238
240
// The node kind appearing in the tree that describes the content of the SDK
@@ -278,6 +280,8 @@ static raw_ostream &operator<<(raw_ostream &Out, const DeclKind Value) {
278
280
#define DECL (X, PARENT ) case DeclKind::X: return Out << #X;
279
281
#include " swift/AST/DeclNodes.def"
280
282
}
283
+
284
+ llvm_unreachable (" Unhandled DeclKind in switch." );
281
285
}
282
286
283
287
struct SDKNodeInitInfo {
@@ -645,6 +649,8 @@ bool SDKNodeDecl::classof(const SDKNode *N) {
645
649
case SDKNodeKind::TypeNameAlias:
646
650
return false ;
647
651
}
652
+
653
+ llvm_unreachable (" Unhandled SDKNodeKind in switch." );
648
654
}
649
655
650
656
void SDKNodeDecl::addDeclAttribute (SDKDeclAttrKind DAKind) {
@@ -939,6 +945,8 @@ bool SDKNode::operator==(const SDKNode &Other) const {
939
945
hasSameChildren (Other);
940
946
}
941
947
}
948
+
949
+ llvm_unreachable (" Unhanlded SDKNodeKind in switch." );
942
950
}
943
951
944
952
// The pretty printer of a tree of SDKNode
@@ -2984,6 +2992,8 @@ void DiagnosisEmitter::handle(const SDKNodeDecl *Node, NodeAnnotation Anno) {
2984
2992
case Ownership::Unowned: return Ctx.buffer (" unowned" );
2985
2993
case Ownership::Unmanaged: return Ctx.buffer (" unowned(unsafe)" );
2986
2994
}
2995
+
2996
+ llvm_unreachable (" Unhandled Ownership in switch." );
2987
2997
};
2988
2998
auto *Count = UpdateMap.findUpdateCounterpart (Node)->getAs <SDKNodeDecl>();
2989
2999
AttrChangedDecls.Diags .emplace_back (Node->getDeclKind (),
0 commit comments