[PATCH] D79820: [test] Improve FileCheck's numeric-expression.txt

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 15 02:19:19 PDT 2020


thopre marked 4 inline comments as done.
thopre added inline comments.


================
Comment at: llvm/test/FileCheck/numeric-expression.txt:12
+DEF DEFAULT FMT SPC  // CHECK-LABEL: DEF DEFAULT FMT SPC
+11  // CHECK-NEXT: {{^}}[[# UNSIa:]]
+11  // CHECK-NEXT: {{^}}[[# UNSIb :]]
----------------
jhenderson wrote:
> I'm not sure I follow why in some cases, you've added `{{^}}`, but not in others. It looks like here for example, it's not needed.
I missed a few. Fixed now. In most cases it's not needed but adding them now means if the line is changed the test will still pass. Also it's nicer visually since it keeps everything aligned and consistent.


================
Comment at: llvm/test/FileCheck/numeric-expression.txt:17-18
 ; Numeric variable redefinition.
-REDEF NO SPC
-11
-CHECK-LABEL: REDEF
-CHECK-NEXT: [[#VAR1:]]
+REDEF NO SPC  // CHECK-LABEL: REDEF
+11 // CHECK-NEXT: [[#UNSI:]]
 
----------------
jhenderson wrote:
> Nit: throughout, in most places you've used two spaces before the start of the comment, but on this line at least, you've used 1. Probably you should be consistent. I have a marginal preference for 1, but don't mind 2 if it looks better to you.
Sorry, I sticked to 2 because it was less work and it separates the CHECK better from the input values.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79820





More information about the llvm-commits mailing list