[PATCH] D86315: Test all CHECK-NOT in a block even if one fails

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 00:30:16 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/test/FileCheck/multiple-check-not-failures.txt:2
+; Check that all errors in a CHECK-NOT blocks are reported, but that FileCheck
+; does not check passed the block.
+RUN: %ProtectFileCheckOutput \
----------------



================
Comment at: llvm/test/FileCheck/multiple-check-not-failures.txt:4-5
+RUN: %ProtectFileCheckOutput \
+RUN: not FileCheck --input-file %s %s 2>&1 \
+RUN:   | FileCheck --strict-whitespace --check-prefix CHECK-ERRORS %s
+
----------------
I prefer this style - it means each line clearly indicates the continuation pattern individually, whilst also showing that the entire command is present in the first line (which the existing style doesn't).


================
Comment at: llvm/test/FileCheck/multiple-check-not-failures.txt:31
+CHECK-ERRORS-NEXT: {{^}}^~~{{$}}
+CHECK-ERRORS-NOT: multiple-check-not-failures.txt:[[#@LINE-14]]:12: error: CHECK-NOT: excluded string found in input
+CHECK-ERRORS-NOT:      {{C}}HECK-NOT: baz
----------------
I think this line is a little too precise for a -NOT pattern - a slight change to the message would result in the check no longer doing anything useful.

You could probably just get away with something like `CHECK-ERRORS-NOT: error:`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86315



More information about the llvm-commits mailing list