summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py
diff options
context:
space:
mode:
authorJoel E. Denny <jdenny.ornl@gmail.com>2018-12-18 00:02:22 +0000
committerJoel E. Denny <jdenny.ornl@gmail.com>2018-12-18 00:02:22 +0000
commitcadfcef493d4b31421558a03b895262e3d7769da (patch)
tree8b0ee4bf5c281803066af4cf5b444aba73032299 /lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py
parent2c007c807d38af1c7ae3bd08bc6695627abcb724 (diff)
downloadbcm5719-llvm-cadfcef493d4b31421558a03b895262e3d7769da.tar.gz
bcm5719-llvm-cadfcef493d4b31421558a03b895262e3d7769da.zip
[FileCheck] Annotate input dump (3/7)
This patch implements input annotations for diagnostics that report wrong-line matches for the directives CHECK-NEXT, CHECK-SAME, and CHECK-EMPTY. Instead of the usual `^~~`, which is used by later patches for good matches, these annotations use `!~~` to mark the bad match ranges so that this category of errors is visually distinct. Because such matches are errors, these annotates are red when colors are enabled. For example: ``` $ FileCheck -dump-input=help The following description was requested by -dump-input=help to explain the input annotations printed by -dump-input=always and -dump-input=fail: - L: labels line number L of the input file - T:L labels the only match result for a pattern of type T from line L of the check file - T:L'N labels the Nth match result for a pattern of type T from line L of the check file - !~~ marks bad match, such as: - CHECK-NEXT on same line as previous match (error) - X~~ marks search range when no match is found, such as: - CHECK-NEXT not found (error) - ? marks fuzzy match when no match is found - colors error, fuzzy match If you are not seeing color above or in input dumps, try: -color $ FileCheck -v -dump-input=always check2 < input2 |& sed -n '/^<<<</,$p' <<<<<< 1: foo bar next:2 !~~ error: match on wrong line >>>>>> $ cat check2 CHECK: foo CHECK-NEXT: bar $ cat input2 foo bar ``` Reviewed By: george.karpenkov, probinson Differential Revision: https://reviews.llvm.org/D53894 llvm-svn: 349420
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud