[llvm-bugs] [Bug 30934] New: YAML error not reported by ``yaml::Input::error()``

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Nov 7 11:14:28 PST 2016


            Bug ID: 30934
           Summary: YAML error not reported by ``yaml::Input::error()``
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Support Libraries
          Assignee: unassignedbugs at nondot.org
          Reporter: serge.guelton at telecom-bretagne.eu
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 17561
  --> https://llvm.org/bugs/attachment.cgi?id=17561&action=edit
Possible patch

When parsing the following stream:

- 1
- 2
- 4
- 5

Using the ``yaml::Input`` class, an error is printed but the ``error()`` method
does not correctly report the issue.

I've been digging through the code and it appears that (some) scanner errors
are not reported at the Input level.

The attached patch demonstrates a possible fix + unittest, I wonder if an
auxiliary method would make it more readable?

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161107/3e4285aa/attachment.html>

More information about the llvm-bugs mailing list