-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UpdateTestChecks] Fix
update_*_test_checks.py
to add "unused" pref…
…ixes The support introduced in D124306 was only added to update_llc_test_checks.py, but the motivating usecases (see https://lists.llvm.org/pipermail/llvm-dev/2021-February/148326.html) cover update_test_checks.py, update_cc_test_checks.py, and update_analyze_test_checks.py, too. Issue #59220. Differential Revision: https://reviews.llvm.org/D138836
- Loading branch information
Showing
14 changed files
with
166 additions
and
65 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
clang/test/utils/update_cc_test_checks/Inputs/prefix-never-matches.cpp.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py | ||
// RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -O0 -o - %s | FileCheck %s -check-prefix=A | ||
// RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -O3 -o - %s | FileCheck %s -check-prefix=A | ||
|
||
int foo(int i ) { | ||
return 1; | ||
} | ||
//// NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: | ||
// A: {{.*}} |
7 changes: 2 additions & 5 deletions
7
clang/test/utils/update_cc_test_checks/prefix-never-matches.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
# RUN: cp -f %S/Inputs/prefix-never-matches.cpp %t.cpp | ||
# RUN: %update_cc_test_checks %t.cpp 2>&1 | FileCheck %s | ||
# RUN: FileCheck --input-file=%t.cpp %s --check-prefix=OUTPUT | ||
|
||
# CHECK: WARNING: Prefix A had conflicting output | ||
# OUTPUT-NOT: A: | ||
# RUN: %update_cc_test_checks %t.cpp | ||
# RUN: diff -u %t.cpp %S/Inputs/prefix-never-matches.cpp.expected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/prefix-never-matches.ll.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py | ||
; RUN: opt -O0 -S < %s | FileCheck %s -check-prefix=A | ||
; RUN: opt -O3 -S < %s | FileCheck %s -check-prefix=A | ||
|
||
define i32 @foo(i32 %i) { | ||
%r = add i32 1, 1 | ||
ret i32 %r | ||
} | ||
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: | ||
; A: {{.*}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 2 additions & 5 deletions
7
llvm/test/tools/UpdateTestChecks/update_test_checks/prefix-never-matches.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
# RUN: cp -f %S/Inputs/prefix-never-matches.ll %t.ll | ||
# RUN: %update_test_checks %t.ll 2>&1 | FileCheck %s | ||
# RUN: FileCheck --input-file=%t.ll %s --check-prefix=OUTPUT | ||
|
||
# CHECK: WARNING: Prefix A had conflicting output | ||
# OUTPUT-NOT: A: | ||
# RUN: %update_test_checks %t.ll | ||
# RUN: diff -u %t.ll %S/Inputs/prefix-never-matches.ll.expected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters