[PATCH] D93037: [YAML] Use correct source location for unknown key errors.

Nathan James via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 08:21:33 PST 2020


njames93 created this revision.
njames93 added a reviewer: silvas.
Herald added subscribers: dexonsmith, hiraditya.
njames93 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Currently unknown keys when inputting mapping traits have the location set to the Value.
Example:

  YAML:1:14: error: unknown key 'UnknownKey'
  {UnknownKey: SomeValue}
               ^~~~~~~~~

This is unhelpful for a user as it draws them to fix the wrong item.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93037

Files:
  llvm/include/llvm/Support/YAMLParser.h
  llvm/include/llvm/Support/YAMLTraits.h
  llvm/lib/Support/YAMLParser.cpp
  llvm/lib/Support/YAMLTraits.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93037.310901.patch
Type: text/x-patch
Size: 4704 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201210/7ba3e6ae/attachment.bin>


More information about the llvm-commits mailing list