1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
llvm-mirror/test/Object/nm-tapi-invalids.test
Nathan James 5aeae74b36 [YAML] Use correct source location for unknown key errors.
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.

Reviewed By: silvas

Differential Revision: https://reviews.llvm.org/D93037
2020-12-11 16:34:06 +00:00

21 lines
689 B
Plaintext

RUN: not llvm-nm %p/Inputs/tapi-invalid-v1.tbd 2>&1\
RUN: | FileCheck %s -check-prefix V1
RUN: not llvm-nm %p/Inputs/tapi-invalid-v2.tbd 2>&1\
RUN: | FileCheck %s -check-prefix V2
RUN: not llvm-nm %p/Inputs/tapi-invalid-v3.tbd 2>&1\
RUN: | FileCheck %s -check-prefix V3
# Typo Check
V1: tapi-invalid-v1.tbd malformed file
V1-NEXT: tapi-invalid-v1.tbd:11:1: error: unknown key 'expors'
# Missing required key
V2: tapi-invalid-v2.tbd malformed file
V2-NEXT: tapi-invalid-v2.tbd:2:1: error: missing required key 'archs'
# v2 key in v3 specified file
V3: tapi-invalid-v3.tbd malformed file
V3-NEXT: tapi-invalid-v3.tbd:19:1: error: unknown key 'swift-version'