mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] Return a default UID in getUIDForSyntaxNodeKind()
Assert 0 and return a default kind, rather than calling unreachable as a defensive fix for rdar://problem/53343735.
This commit is contained in:
@@ -467,7 +467,9 @@ UIdent SwiftLangSupport::getUIDForSyntaxNodeKind(SyntaxNodeKind SC) {
|
||||
return KindObjectLiteral;
|
||||
}
|
||||
|
||||
llvm_unreachable("Unhandled SyntaxNodeKind in switch.");
|
||||
// Default to a known kind to prevent crashing in non-asserts builds
|
||||
assert(0 && "Unhandled SyntaxNodeKind in switch.");
|
||||
return KindIdentifier;
|
||||
}
|
||||
|
||||
UIdent SwiftLangSupport::getUIDForSyntaxStructureKind(
|
||||
|
||||
Reference in New Issue
Block a user