[PATCH] D26419: Bug 30934 - YAML error not reported by ``yaml::Input::error()``

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 22:01:51 PST 2016


mehdi_amini added inline comments.


================
Comment at: lib/Support/YAMLTraits.cpp:115
 void Input::beginMapping() {
-  if (EC)
+  if (EC || Strm->failed())
     return;
----------------
So it seems that any error checking on `Input` should also check on the Stream itself. It may be less error prone to refactor this check into a single method and turn all the tests into `if (hasError()) return;`


Repository:
  rL LLVM

https://reviews.llvm.org/D26419





More information about the llvm-commits mailing list