Found by clangd-fuzzer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318935
91177308-0d34-0410-b5e6-
96231b3b80d8
Node *getValue();
void skip() override {
- getKey()->skip();
- if (Node *Val = getValue())
- Val->skip();
+ if (Node *Val = getKey()) {
+ Key->skip();
+ if (Node *Val = getValue())
+ Val->skip();
+ }
}
static bool classof(const Node *N) {
}
TEST(YAMLParser, HandlesNullValuesInKeyValueNodesGracefully) {
+ ExpectParseError("KeyValueNode with null key", "? \"\n:");
ExpectParseError("KeyValueNode with null value", "test: '");
}