Go to file
Joel E. Denny 2c007c807d [FileCheck] Annotate input dump (2/7)
This patch implements input annotations for diagnostics that suggest
fuzzy matches for directives for which no matches were found.  Instead
of using the usual `^~~`, which is used by later patches for good
matches, these annotations use `?` so that fuzzy matches are visually
distinct.  No tildes are included as these diagnostics (independently
of this patch) currently identify only the start of the match.

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
  - X~~    marks search range when no match is found
  - ?      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 check1 < input1 |& sed -n '/^<<<</,$p'
<<<<<<
          1: ; abc def
          2: ; ghI jkl
next:3'0     X~~~~~~~~ error: no match found
next:3'1       ?       possible intended match
>>>>>>

$ cat check1
CHECK: abc
CHECK-SAME: def
CHECK-NEXT: ghi
CHECK-SAME: jkl

$ cat input1
; abc def
; ghI jkl
```

This patch introduces the concept of multiple "match results" per
directive.  In the above example, the first match result for the
CHECK-NEXT directive is the failed match, for which the annotation
shows the search range.  The second match result is the fuzzy match.
Later patches will introduce other cases of multiple match results per
directive.

When colors are enabled, `?` is colored magenta.  That is, it doesn't
indicate the actual error, which a red `X~~` marker indicates, but its
color suggests it's closely related.

Reviewed By: george.karpenkov, probinson

Differential Revision: https://reviews.llvm.org/D53893

llvm-svn: 349419
2018-12-18 00:02:04 +00:00
clang Fix ms-layout_version declspec test and add missing new test 2018-12-17 23:16:43 +00:00
clang-tools-extra [clangd] Change diskbackedstorage to be atomic 2018-12-17 12:38:22 +00:00
compiler-rt Don't trigger sanitizer initialization from `sysctlbyname` and `sysctl` interceptor. 2018-12-17 21:42:55 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc travis: Add cmake build 2018-11-27 16:07:21 +00:00
libcxx [libcxx][NFC] Properly indent nested #ifdefs and #defines 2018-12-17 22:22:44 +00:00
libcxxabi [libcxx] Remove bad_array_length 2018-11-29 19:44:57 +00:00
libunwind [AArch64][libunwind] Unwinding support for return address signing with B Key 2018-12-17 11:43:24 +00:00
lld ELF: AArch64: Fix errata patch address calculation. 2018-12-17 20:15:12 +00:00
lldb A few small updates to the testsuite for running against an iOS device. 2018-12-17 23:33:40 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm [FileCheck] Annotate input dump (2/7) 2018-12-18 00:02:04 +00:00
openmp [OpenMP] version the affinity format tests and fix one test 2018-12-17 22:53:47 +00:00
parallel-libs Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
polly [CMake] Fix generation of exported targets in build directory 2018-11-06 15:18:17 +00:00
README.md Update the project name in README.md 2018-10-19 00:03:01 +00:00

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.