[llvm] ee703eb - [FileCheck] Address unused prefixes in tests

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 30 14:14:12 PDT 2020


Author: Mircea Trofin
Date: 2020-10-30T14:14:02-07:00
New Revision: ee703eb4726ba570b3831400cc1b0bc3ae0f88b9

URL: https://github.com/llvm/llvm-project/commit/ee703eb4726ba570b3831400cc1b0bc3ae0f88b9
DIFF: https://github.com/llvm/llvm-project/commit/ee703eb4726ba570b3831400cc1b0bc3ae0f88b9.diff

LOG: [FileCheck] Address unused prefixes in tests

Added -allow-unused-prefixes as necessary.

Differential Revision: https://reviews.llvm.org/D90496

Added: 
    

Modified: 
    llvm/test/FileCheck/check-a-b-has-b.txt
    llvm/test/FileCheck/check-b-a-has-b.txt
    llvm/test/FileCheck/check-multiple-prefixes-substr.txt
    llvm/test/FileCheck/check-substring-multi-prefix-2.txt
    llvm/test/FileCheck/dump-input-annotations.txt
    llvm/test/FileCheck/multiple-missing-prefixes.txt

Removed: 
    


################################################################################
diff  --git a/llvm/test/FileCheck/check-a-b-has-b.txt b/llvm/test/FileCheck/check-a-b-has-b.txt
index 4d64d098ae2e..62ed3294d7a9 100644
--- a/llvm/test/FileCheck/check-a-b-has-b.txt
+++ b/llvm/test/FileCheck/check-a-b-has-b.txt
@@ -1,4 +1,4 @@
-; RUN: FileCheck -check-prefix=A -check-prefix=B -input-file %s %s
+; RUN: FileCheck -check-prefix=A -check-prefix=B -input-file %s %s -allow-unused-prefixes
 
 this is the string to be matched
 

diff  --git a/llvm/test/FileCheck/check-b-a-has-b.txt b/llvm/test/FileCheck/check-b-a-has-b.txt
index ac149906c52f..4441898cea45 100644
--- a/llvm/test/FileCheck/check-b-a-has-b.txt
+++ b/llvm/test/FileCheck/check-b-a-has-b.txt
@@ -1,4 +1,4 @@
-; RUN: FileCheck -check-prefix=B -check-prefix=A -input-file %s %s
+; RUN: FileCheck -check-prefix=B -check-prefix=A -input-file %s %s -allow-unused-prefixes
 
 this is the string to be matched
 

diff  --git a/llvm/test/FileCheck/check-multiple-prefixes-substr.txt b/llvm/test/FileCheck/check-multiple-prefixes-substr.txt
index 76a2ca8e75c5..69c5dfa29d81 100644
--- a/llvm/test/FileCheck/check-multiple-prefixes-substr.txt
+++ b/llvm/test/FileCheck/check-multiple-prefixes-substr.txt
@@ -1,5 +1,5 @@
-// RUN: FileCheck -check-prefix=CHECKER -check-prefix=CHECK -input-file %s %s
-// RUN: FileCheck -check-prefix=CHECK -check-prefix=CHECKER -input-file %s %s
+// RUN: FileCheck -check-prefix=CHECKER -check-prefix=CHECK -input-file %s %s -allow-unused-prefixes
+// RUN: FileCheck -check-prefix=CHECK -check-prefix=CHECKER -input-file %s %s -allow-unused-prefixes
 
 foo
 ; CHECKER: fo{{o}}

diff  --git a/llvm/test/FileCheck/check-substring-multi-prefix-2.txt b/llvm/test/FileCheck/check-substring-multi-prefix-2.txt
index 618a2884d4ad..7bbe4d16b2ae 100644
--- a/llvm/test/FileCheck/check-substring-multi-prefix-2.txt
+++ b/llvm/test/FileCheck/check-substring-multi-prefix-2.txt
@@ -1,6 +1,6 @@
-; RUN: FileCheck -check-prefix=FOO -check-prefix=FOOBAR -check-prefix=BARFOO -input-file %s %s
-; RUN: FileCheck -check-prefix=FOOBAR -check-prefix=FOO -check-prefix=BARFOO -input-file %s %s
-; RUN: FileCheck -check-prefix=FOOBAR -check-prefix=BARFOO -check-prefix=FOO -input-file %s %s
+; RUN: FileCheck -check-prefix=FOO -check-prefix=FOOBAR -check-prefix=BARFOO -input-file %s %s -allow-unused-prefixes
+; RUN: FileCheck -check-prefix=FOOBAR -check-prefix=FOO -check-prefix=BARFOO -input-file %s %s -allow-unused-prefixes
+; RUN: FileCheck -check-prefix=FOOBAR -check-prefix=BARFOO -check-prefix=FOO -input-file %s %s -allow-unused-prefixes
 
 this is the match
 this is another

diff  --git a/llvm/test/FileCheck/dump-input-annotations.txt b/llvm/test/FileCheck/dump-input-annotations.txt
index 80d9b1d3c4e8..e3315b5d1451 100644
--- a/llvm/test/FileCheck/dump-input-annotations.txt
+++ b/llvm/test/FileCheck/dump-input-annotations.txt
@@ -143,7 +143,7 @@
 ; RUN: %ProtectFileCheckOutput \
 ; RUN: not FileCheck -dump-input=always -input-file %t.in %t.chk -vv 2>&1 \
 ; RUN: | FileCheck -match-full-lines %s -check-prefixes=NXT,NXT-V,NXT-VV \
-; RUN:             -implicit-check-not='remark:'
+; RUN:             -implicit-check-not='remark:' -allow-unused-prefixes
 
 ; Verbose diagnostics are suppressed but not errors.
 ; NXT: {{.*}}error:{{.*}}
@@ -200,7 +200,7 @@
 ; RUN: %ProtectFileCheckOutput \
 ; RUN: not FileCheck -dump-input=always -input-file %t.in %t.chk -vv 2>&1 \
 ; RUN: | FileCheck -match-full-lines %s -check-prefixes=SAM,SAM-V,SAM-VV \
-; RUN:             -implicit-check-not='remark:'
+; RUN:             -implicit-check-not='remark:' -allow-unused-prefixes
 
 ; Verbose diagnostics are suppressed but not errors.
 ; SAM: {{.*}}error:{{.*}}
@@ -267,7 +267,7 @@
 ; RUN: %ProtectFileCheckOutput \
 ; RUN: not FileCheck -dump-input=always -input-file %t.in %t.chk -vv 2>&1 \
 ; RUN: | FileCheck -match-full-lines %s -check-prefixes=EMP,EMP-V,EMP-VV \
-; RUN:             -implicit-check-not='remark:'
+; RUN:             -implicit-check-not='remark:' -allow-unused-prefixes
 
 ; Verbose diagnostics are suppressed but not errors.
 ; EMP: {{.*}}error:{{.*}}
@@ -304,7 +304,7 @@
 ; RUN: %ProtectFileCheckOutput \
 ; RUN: not FileCheck -dump-input=always -input-file %t.in %t.chk -vv 2>&1 \
 ; RUN: | FileCheck -match-full-lines %s -check-prefixes=EMP2,EMP2-V,EMP2-VV \
-; RUN:             -implicit-check-not='remark:'
+; RUN:             -implicit-check-not='remark:' -allow-unused-prefixes
 
 ; Verbose diagnostics are suppressed but not errors.
 ; EMP2: {{.*}}error:{{.*}}
@@ -338,11 +338,11 @@
 ; RUN: %ProtectFileCheckOutput \
 ; RUN: not FileCheck -dump-input=always -input-file %t.in %t.chk -v 2>&1 \
 ; RUN: | FileCheck -match-full-lines %s -check-prefixes=NOT,NOT-V \
-; RUN:             -implicit-check-not='remark:'
+; RUN:             -implicit-check-not='remark:' -allow-unused-prefixes
 ; RUN: %ProtectFileCheckOutput \
 ; RUN: not FileCheck -dump-input=always -input-file %t.in %t.chk -vv 2>&1 \
 ; RUN: | FileCheck -match-full-lines %s -check-prefixes=NOT,NOT-V,NOT-VV \
-; RUN:             -implicit-check-not='remark:'
+; RUN:             -implicit-check-not='remark:' -allow-unused-prefixes
 
 ; Verbose diagnostics are suppressed but not errors.
 ; NOT: {{.*}}error:{{.*}}
@@ -522,7 +522,7 @@
 ; RUN: %ProtectFileCheckOutput \
 ; RUN: not FileCheck -dump-input=always -input-file %t.in %t.chk -vv 2>&1 \
 ; RUN: | FileCheck -match-full-lines %s -check-prefixes=LAB,LAB-V,LAB-VV \
-; RUN:             -implicit-check-not='remark:'
+; RUN:             -implicit-check-not='remark:' -allow-unused-prefixes
 
 ; Verbose diagnostics are suppressed but not errors.
 ; LAB: {{.*}}error:{{.*}}

diff  --git a/llvm/test/FileCheck/multiple-missing-prefixes.txt b/llvm/test/FileCheck/multiple-missing-prefixes.txt
index ed2007e6272e..faa2c78bcfb7 100644
--- a/llvm/test/FileCheck/multiple-missing-prefixes.txt
+++ b/llvm/test/FileCheck/multiple-missing-prefixes.txt
@@ -1,6 +1,6 @@
 // RUN: FileCheck -check-prefix=ANOTHER-PREFIX -input-file %s %s
-// RUN: %ProtectFileCheckOutput not FileCheck -check-prefix=PREFIX1 -check-prefix=PREFIX2 -input-file %s %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK-NONEXISTENT-PREFIX -check-prefix=ALSO-NONEXISTENT %s
-// RUN: %ProtectFileCheckOutput not FileCheck -check-prefixes=PREFIX1,PREFIX2 -input-file %s %s 2>&1 | FileCheck -strict-whitespace -check-prefixes=CHECK-NONEXISTENT-PREFIX,ALSO-NONEXISTENT %s
+// RUN: %ProtectFileCheckOutput not FileCheck -check-prefix=PREFIX1 -check-prefix=PREFIX2 -input-file %s %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK-NONEXISTENT-PREFIX -check-prefix=ALSO-NONEXISTENT -allow-unused-prefixes %s
+// RUN: %ProtectFileCheckOutput not FileCheck -check-prefixes=PREFIX1,PREFIX2 -input-file %s %s 2>&1 | FileCheck -strict-whitespace -check-prefixes=CHECK-NONEXISTENT-PREFIX,ALSO-NONEXISTENT -allow-unused-prefixes %s
 
 foobar
 ; ANOTHER-PREFIX: foobar


        


More information about the llvm-commits mailing list