[llvm] c0cea2d - [Test][FileCheck] Fix use of undef var
Thomas Preud'homme via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 9 02:45:03 PST 2021
Author: Thomas Preud'homme
Date: 2021-01-09T10:45:00Z
New Revision: c0cea2d9b8ae4dc47f7737e47a621ddcb9cb57cf
URL: https://github.com/llvm/llvm-project/commit/c0cea2d9b8ae4dc47f7737e47a621ddcb9cb57cf
DIFF: https://github.com/llvm/llvm-project/commit/c0cea2d9b8ae4dc47f7737e47a621ddcb9cb57cf.diff
LOG: [Test][FileCheck] Fix use of undef var
The test related to directives with prefix NUMEXPR-CONSTRAINT-NOMATCH
refers to the numeric variable UNSI which is defined by a directive with
prefix CHECK not enabled on the lit command-line. Rather than adding the
prefix CHECK to the lit command-line, this commit defined variable UNSI
in a new NUMEXPR-CONSTRAINT-NOMATCH prefixed directive. The directive
needs to contain more than just the variable otherwise the error message
from FileCheck is about the wrong line being matched.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D93346
Added:
Modified:
llvm/test/FileCheck/numeric-expression.txt
Removed:
################################################################################
diff --git a/llvm/test/FileCheck/numeric-expression.txt b/llvm/test/FileCheck/numeric-expression.txt
index 7969ca966a99..0f6c143471a1 100644
--- a/llvm/test/FileCheck/numeric-expression.txt
+++ b/llvm/test/FileCheck/numeric-expression.txt
@@ -250,12 +250,14 @@ RUN: not FileCheck --check-prefix NUMEXPR-CONSTRAINT-NOMATCH --input-file %s %s
RUN: | FileCheck --check-prefix NUMEXPR-CONSTRAINT-NOMATCH-MSG --strict-whitespace %s
USE DEF FMT EXPL NO MATCH
-12
+UNSI=11
+UNSI: 12
NUMEXPR-CONSTRAINT-NOMATCH-LABEL: USE DEF FMT EXPL NO MATCH
-NUMEXPR-CONSTRAINT-NOMATCH-NEXT: [[#==UNSI]]
+NUMEXPR-CONSTRAINT-NOMATCH-NEXT: UNSI=[[#UNSI:]]
+NUMEXPR-CONSTRAINT-NOMATCH-NEXT: UNSI: [[#==UNSI]]
NUMEXPR-CONSTRAINT-NOMATCH-MSG: numeric-expression.txt:[[#@LINE-1]]:34: error: {{N}}UMEXPR-CONSTRAINT-NOMATCH-NEXT: expected string not found in input
-NUMEXPR-CONSTRAINT-NOMATCH-MSG-NEXT: {{N}}UMEXPR-CONSTRAINT-NOMATCH-NEXT: {{\[\[#==UNSI\]\]}}
-NUMEXPR-CONSTRAINT-NOMATCH-MSG-NEXT: {{^}} ^{{$}}
+NUMEXPR-CONSTRAINT-NOMATCH-MSG-NEXT: {{N}}UMEXPR-CONSTRAINT-NOMATCH-NEXT: UNSI: {{\[\[#==UNSI\]\]}}
+NUMEXPR-CONSTRAINT-NOMATCH-MSG-NEXT: {{^}} ^{{$}}
; Empty numeric expression with matching constraint.
RUN: %ProtectFileCheckOutput \
More information about the llvm-commits
mailing list