[PATCH] D78024: [FileCheck] - Fix the false positive when -implicit-check-not is used with an unknown -check-prefix.

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 11:18:01 PDT 2020


jdenny added a reviewer: jdenny.
jdenny added inline comments.


================
Comment at: llvm/test/FileCheck/implicit-check-not.txt:3-11
+; Check we report an error when an unknown prefix is used together with `-implicit-check-not`
+; RUN: sed 's#^;.*##' %s | not FileCheck -check-prefix=UNKNOWN-PREFIX -implicit-check-not=abc %s 2>&1 | FileCheck %s -check-prefix CHECK-PREFIX-ERROR
+; CHECK-PREFIX-ERROR: error: no check strings found with prefix 'UNKNOWN-PREFIX:'
+
+; Check we allow using `-implicit-check-not` when there is no `-check-prefix` specified and there
+; is no default `CHECK` line in an input. Use an arbitrary random unique string as an
+; argument for `-implicit-check-not`.
----------------
All of these new tests pass for me even without your changes to FileCheck.


================
Comment at: llvm/test/FileCheck/implicit-check-not.txt:4
+; Check we report an error when an unknown prefix is used together with `-implicit-check-not`
+; RUN: sed 's#^;.*##' %s | not FileCheck -check-prefix=UNKNOWN-PREFIX -implicit-check-not=abc %s 2>&1 | FileCheck %s -check-prefix CHECK-PREFIX-ERROR
+; CHECK-PREFIX-ERROR: error: no check strings found with prefix 'UNKNOWN-PREFIX:'
----------------
Please add `%ProtectFileCheckOutput` on the first FileCheck command here because its textual output affects test results.


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

https://reviews.llvm.org/D78024





More information about the llvm-commits mailing list