Only require coverage of node-specific overloads of getFirstChildExists

This commit is contained in:
2024-10-11 16:47:19 -07:00
parent 0ac259c782
commit fe9678787d

View File

@@ -1295,9 +1295,11 @@ Node *getFirstChildExists(Node256 *self) {
// Precondition: self has a child
Node *getFirstChildExists(Node *self) {
// Only require that the node-specific overloads are covered
// GCOVR_EXCL_START
switch (self->getType()) {
case Type_Node0: // GCOVR_EXCL_LINE
__builtin_unreachable(); // GCOVR_EXCL_LINE
case Type_Node0:
__builtin_unreachable();
case Type_Node3:
return getFirstChildExists(static_cast<Node3 *>(self));
case Type_Node16:
@@ -1306,9 +1308,10 @@ Node *getFirstChildExists(Node *self) {
return getFirstChildExists(static_cast<Node48 *>(self));
case Type_Node256:
return getFirstChildExists(static_cast<Node256 *>(self));
default: // GCOVR_EXCL_LINE
__builtin_unreachable(); // GCOVR_EXCL_LINE
default:
__builtin_unreachable();
}
// GCOVR_EXCL_STOP
}
void consumePartialKeyFull(TaggedNodePointer &self,