[PATCH] D22619: Simplify error reporting in YAMLParser

Paweł Bylica via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 23 12:29:40 PDT 2016


chfast added inline comments.

================
Comment at: lib/Support/YAMLParser.cpp:998-999
@@ -997,4 +993,3 @@
       if (i->IsRequired)
-        setError( "Could not find expected : for simple key"
-                , i->Tok->Range.begin());
       i = SimpleKeys.erase(i);
----------------
Bigcheese wrote:
> This one appears to change behavior with this patch. I don't believe this will ever be the same token as Current.
You are partly right. The information provided by the second argument is never used because the param in setError() function is unused. This is the true origin of this patch.

I've changes that in https://reviews.llvm.org/D22565. But apparently nobody cares about this detail in error reports as this has been unnoticed for years. So this patch keeps status quo and simplifies the code.


https://reviews.llvm.org/D22619





More information about the llvm-commits mailing list