[PATCH] Detect malformed yaml sequence in yaml::Input::beginSequence()
William Fisher
william.w.fisher at gmail.com
Mon Dec 29 09:40:55 PST 2014
When reading a yaml::SequenceTraits object, YAMLIO does report an
error if the yaml item is not a sequence. Instead, YAMLIO reads an
empty sequence. For example:
---
seq:
foo: 1
bar: 2
...
If `seq` is a SequenceTraits object, then reading the above yaml will
yield `seq` as an empty sequence. The enclosed patch reports an error
for the above mapping ("not a sequence")
Null and empty nodes are still interpreted as empty sequences:
---
seq1: # Empty node okay
---
seq2: null # null okay
...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yaml-not-a-seq.patch
Type: application/octet-stream
Size: 3771 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141229/433cbd0a/attachment.obj>
More information about the llvm-commits
mailing list