[PATCH] D64923: [FileCheck]] Canonicalize caret location testing
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 18 07:50:47 PDT 2019
jhenderson added inline comments.
================
Comment at: llvm/test/FileCheck/check-not-diaginfo.txt:8
DIAG-NEXT: CHECK-NOT: test
-DIAG-NEXT: {{^ \^}}
+DIAG-NEXT: {{^}} ^
DIAG-NEXT: note: found here
----------------
In this context, where exactly is the caret actually pointing at? Can spaces be added to one or more lines to get the caret to nicely line up?
================
Comment at: llvm/test/FileCheck/numeric-defines-diagnostics.txt:9
+NUMERRCLIFMT-NEXT:Global define #1: #10VALUE=10 (parsed as: {{\[\[#10VALUE:10\]\]}})
+NUMERRCLIFMT-NEXT: ^
----------------
Up to you whether you do this, as you may not like it, but I recently realised that you could add leading spaces before the `NUMERRCLIFMT:` tag to make it line up nicely, whilst still honouring --match-full-lines. Something like:
```
NUMERRCLIFMT-NEXT:Global define #1: #10VALUE=10 (parsed as: {{\[\[#10
NUMERRCLIFMT-NEXT: ^
```
================
Comment at: llvm/test/FileCheck/numeric-expression.txt:109
UNDEF-USE-MSG-NEXT: {{U}}NDEF-USE-NEXT: UNDEFVAR: {{\[\[#UNDEFVAR1\+UNDEFVAR2\]\]}}
-UNDEF-USE-MSG-NEXT: {{^ \^$}}
+UNDEF-USE-MSG-NEXT: {{^}} ^
UNDEF-USE-MSG-NEXT: numeric-expression.txt:[[#@LINE-6]]:1: note: scanning from here
----------------
Similar to elsewhere, can you add/remove spaces on one line to make the caret line up with where it should? Same goes with other tests here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64923/new/
https://reviews.llvm.org/D64923
More information about the llvm-commits
mailing list