summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/YAMLParserTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [YAMLParser] Don't crash on null keys in KeyValueNodes.Benjamin Kramer2017-11-231-0/+1
| | | | | | Found by clangd-fuzzer! llvm-svn: 318935
* Re-sort #include lines for unittests. This uses a slightly modifiedChandler Carruth2017-06-061-1/+1
| | | | | | | | | | | | | | | clang-format (https://reviews.llvm.org/D33932) to keep primary headers at the top and handle new utility headers like 'gmock' consistently with other utility headers. No other change was made. I did no manual edits, all of this is clang-format. This should allow other changes to have more clear and focused diffs, and is especially motivated by moving some headers into more focused libraries. llvm-svn: 304786
* [NFC] Header cleanupMehdi Amini2016-04-181-1/+0
| | | | | | | | | | | | | | Removed some unused headers, replaced some headers with forward class declarations. Found using simple scripts like this one: clear && ack --cpp -l '#include "llvm/ADT/IndexedMap.h"' | xargs grep -L 'IndexedMap[<]' | xargs grep -n --color=auto 'IndexedMap' Patch by Eugene Kosov <claprix@yandex.ru> Differential Revision: http://reviews.llvm.org/D19219 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266595
* Add != to YAMLParser's basic_collection_iterator.Jordan Rose2016-01-061-0/+72
| | | | | | | | | ...and mark it as merely an input_iterator rather than a forward_iterator, since it is destructive. And then rewrite == to take advantage of that. Patch by Alex Denisov! llvm-svn: 256913
* YAML: Null terminate block scalar's value.Alex Lorenz2015-05-211-0/+12
| | | | | | | | | | | | | The commit null terminates the string value in the `yaml::BlockScalarNode` class. This change is motivated by the initial MIR serialization commit (r237708) that I reverted in r237730 because the LLVM IR source from the block scalar node wasn't terminated by a null character and thus the buildbots failed on one testcase sometimes. This change enables me to recommit the reverted commit. llvm-svn: 237942
* YAML: Implement block scalar parsing.Alex Lorenz2015-05-131-0/+27
| | | | | | | | | | | | | | | | | | | | | This commit implements the parsing of YAML block scalars. Some code existed for it before, but it couldn't parse block scalars. This commit adds a new yaml node type to represent the block scalar values. This commit also deletes the 'spec-09-27' and 'spec-09-28' tests as they are identical to the test file 'spec-09-26'. This commit introduces 3 new utility functions to the YAML scanner class: `skip_s_space`, `advanceWhile` and `consumeLineBreakIfPresent`. Reviewers: Duncan P. N. Exon Smith Differential Revision: http://reviews.llvm.org/D9503 llvm-svn: 237314
* YAML: Fix crash in the skip method of KeyValueNode class. Alex Lorenz2015-05-061-0/+4
| | | | | | | | | | | | | This commit changes the 'skip' method in the 'KeyValueNode' class to ensure that it doesn't dereference a null pointer when calling the 'skip' method of its value child node. It also adds a unittest that ensures that the crash doesn't occur. This change is motivated by a patch that implements parsing of YAML block scalars (http://reviews.llvm.org/D9503), as one of the unittests in that patch triggered this problem. llvm-svn: 236669
* Return a std::unique_ptr when creating a new MemoryBuffer.Rafael Espindola2014-08-271-2/+2
| | | | llvm-svn: 216583
* yaml::Stream doesn't need to take ownership of the buffer.Rafael Espindola2014-08-271-1/+1
| | | | | | In fact, most users were already using the StringRef version. llvm-svn: 216575
* Convert an ownership comment with std::uinque_ptr.Rafael Espindola2014-08-171-2/+3
| | | | llvm-svn: 215855
* Test commit, remove trailing whitespaceBenjamin Foster2014-08-131-1/+1
| | | | llvm-svn: 215556
* Allow using MemoryBuffers with yaml::Stream directly.Sean Silva2012-11-191-0/+34
| | | | | | | | | | The rationale is to get YAML filenames in diagnostics from yaml::Stream::printError -- currently the filename is hard-coded as "YAML" because there's no buffer information available. Patch by Kim Gräsman! llvm-svn: 168341
* Suppress stderr noise when test case runs.Nick Kledzik2012-07-311-0/+6
| | | | llvm-svn: 161085
* Add YAML parser to Support.Michael J. Spencer2012-04-031-0/+179
llvm-svn: 153977
OpenPOWER on IntegriCloud