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

serge via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 15 06:30:00 PST 2016


serge-sans-paille marked an inline comment as done.
serge-sans-paille added inline comments.


================
Comment at: lib/Support/YAMLTraits.cpp:115
 void Input::beginMapping() {
-  if (EC)
+  if (EC || Strm->failed())
     return;
----------------
mehdi_amini wrote:
> 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;`
That's my feeling too. I did the proposed refactoring, putting the method as private to prevent semantic conflict with the public error() method.


Repository:
  rL LLVM

https://reviews.llvm.org/D26419





More information about the llvm-commits mailing list