[PATCH] D83650: [FileCheck] Extend -dump-input with substitutions

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 12 20:13:14 PDT 2020


mehdi_amini added a comment.

I agree that I'd like to have more info inline and this is going in the right direction, but what seems missing is still the check line itself.

Have you looked into localizing it as well?

  <<<<<<
             1: hello world
  check:1       ^~~~~~~~~~~ // CHECK: hello [[WHAT:[a-z]+]]
             2: goodbye word
  check:2'0     X~~~~~~~~~~~ error: no match found
  check:2'0     CHECK: [[VERB]] [[WHAT]]
  check:2'1                  with "VERB" equal to "goodbye"
  check:2'2                  with "WHAT" equal to "world"
  >>>>>>

Ultimately with some scheme like this the following header can be entirely omitted:

  error: CHECK: expected string not found in input
  CHECK: [[VERB]] [[WHAT]]
         ^
  <stdin>:2:1: note: scanning from here
  goodbye word
  ^
  <stdin>:2:1: note: with "VERB" equal to "goodbye"
  goodbye word
  ^
  <stdin>:2:1: note: with "WHAT" equal to "world"
  goodbye word
  ^
  
  Input file: <stdin>
  Check file: check
  
  -dump-input=help explains the following input dump.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83650/new/

https://reviews.llvm.org/D83650





More information about the llvm-commits mailing list