[PATCH] [yaml2obj] Add new command line option `-docnum`

Simon Atanasyan simon at atanasyan.com
Thu May 29 11:58:13 PDT 2014


Good point. I am going to send a new patch which moves the loop to the `yaml2obj.cpp` soon.

================
Comment at: lib/Support/YAMLTraits.cpp:93-94
@@ -92,4 +92,4 @@
 
-void Input::nextDocument() {
-  ++DocIterator;
+bool Input::nextDocument() {
+  return ++DocIterator != Strm->end();
 }
----------------
Sean Silva wrote:
> This seems like it should be a separately tested bug fix for YAMLIO
It is not a bug fix. Function `Input::nextDocument()` just incremented the `DocIterator`. We checked the end of documents stream in the `Input::setCurrentDocument()`. Now the `Input::nextDocument()` increments the iterator and return its "status".

http://reviews.llvm.org/D3901






More information about the llvm-commits mailing list