mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +00:00
178504b07b
CHECK-LABEL is meant to be used in place on CHECK on lines containing identifiers or other unique labels (they need not actually be labels in the source or output language, though.) This is used to break up the input stream into separate blocks delineated by CHECK-LABEL lines, each of which is checked independently. This greatly improves the accuracy of errors and fix-it hints in many cases, and allows for FileCheck to recover from errors in one block by continuing to subsequent blocks. Some tests will be converted to use this new directive in forthcoming patches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186162 91177308-0d34-0410-b5e6-96231b3b80d8
52 lines
985 B
Plaintext
52 lines
985 B
Plaintext
; RUN: FileCheck -input-file %s %s -check-prefix=CHECKOK
|
|
; RUN: not FileCheck -input-file %s %s -check-prefix=CHECKFAIL 2>&1 | FileCheck %s -check-prefix=CHECKERROR
|
|
|
|
label0:
|
|
a
|
|
b
|
|
|
|
label1:
|
|
b
|
|
c
|
|
|
|
label2:
|
|
a
|
|
c
|
|
|
|
; CHECKOK-LABEL: {{^}}label0:
|
|
; CHECKOK: {{^}}a
|
|
; CHECKOK: {{^}}b
|
|
|
|
; CHECKOK-LABEL: {{^}}label1:
|
|
; CHECKOK: {{^}}b
|
|
; CHECKOK: {{^}}c
|
|
|
|
; CHECKOK-LABEL: {{^}}label2:
|
|
; CHECKOK: {{^}}a
|
|
; CHECKOK: {{^}}c
|
|
|
|
; CHECKFAIL-LABEL: {{^}}label0:
|
|
; CHECKFAIL: {{^}}a
|
|
; CHECKFAIL: {{^}}b
|
|
; CHECKFAIL: {{^}}c
|
|
|
|
; CHECKERROR: expected string not found in input
|
|
; CHECKERROR-NEXT: CHECKFAIL: {{[{][{]\^[}][}]}}c
|
|
|
|
; CHECKFAIL-LABEL: {{^}}label1:
|
|
; CHECKFAIL: {{^}}a
|
|
; CHECKFAIL: {{^}}b
|
|
; CHECKFAIL: {{^}}c
|
|
|
|
; CHECKERROR: expected string not found in input
|
|
; CHECKERROR-NEXT: CHECKFAIL: {{[{][{]\^[}][}]}}a
|
|
|
|
; CHECKFAIL-LABEL: {{^}}label2:
|
|
; CHECKFAIL: {{^}}a
|
|
; CHECKFAIL: {{^}}b
|
|
; CHECKFAIL: {{^}}c
|
|
|
|
; CHECKERROR: expected string not found in input
|
|
; CHECKERROR-NEXT: CHECKFAIL: {{[{][{]\^[}][}]}}b
|
|
|