Skip to content

[FileCheck] forbid filecheck check prefix definitions to end with directive name #92735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions clang-tools-extra/test/clang-move/move-class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
// RUN: clang-move -names="a::Foo" -new_cc=%T/clang-move/new_test.cpp -new_header=%T/clang-move/new_test.h -old_cc=../src/test.cpp -old_header=../include/test.h %T/clang-move/src/test.cpp
// RUN: FileCheck -input-file=%T/clang-move/new_test.cpp -check-prefix=CHECK-NEW-TEST-CPP %s
// RUN: FileCheck -input-file=%T/clang-move/new_test.h -check-prefix=CHECK-NEW-TEST-H %s
// RUN: FileCheck -input-file=%T/clang-move/src/test.cpp -check-prefix=CHECK-OLD-TEST-EMPTY -allow-empty %s
// RUN: FileCheck -input-file=%T/clang-move/include/test.h -check-prefix=CHECK-OLD-TEST-EMPTY -allow-empty %s
// RUN: FileCheck -input-file=%T/clang-move/src/test.cpp -check-prefix=CHECK-OLD-TEST -allow-empty %s
// RUN: FileCheck -input-file=%T/clang-move/include/test.h -check-prefix=CHECK-OLD-TEST -allow-empty %s
//
// RUN: cp %S/Inputs/test.h %T/clang-move/include
// RUN: cp %S/Inputs/test.cpp %T/clang-move/src
// RUN: cd %T/clang-move/build
// RUN: clang-move -names="a::Foo" -new_cc=%T/clang-move/new_test.cpp -new_header=%T/clang-move/new_test.h -old_cc=%T/clang-move/src/test.cpp -old_header=%T/clang-move/include/test.h %T/clang-move/src/test.cpp
// RUN: FileCheck -input-file=%T/clang-move/new_test.cpp -check-prefix=CHECK-NEW-TEST-CPP %s
// RUN: FileCheck -input-file=%T/clang-move/new_test.h -check-prefix=CHECK-NEW-TEST-H %s
// RUN: FileCheck -input-file=%T/clang-move/src/test.cpp -check-prefix=CHECK-OLD-TEST-EMPTY -allow-empty %s
// RUN: FileCheck -input-file=%T/clang-move/include/test.h -check-prefix=CHECK-OLD-TEST-EMPTY -allow-empty %s
// RUN: FileCheck -input-file=%T/clang-move/src/test.cpp -check-prefix=CHECK-OLD-TEST -allow-empty %s
// RUN: FileCheck -input-file=%T/clang-move/include/test.h -check-prefix=CHECK-OLD-TEST -allow-empty %s
//
//
// CHECK-NEW-TEST-H: #ifndef TEST_H // comment 1
Expand All @@ -40,4 +40,4 @@
// CHECK-NEW-TEST-CPP: int Foo::f2(int a, int b) { return a + b; }
// CHECK-NEW-TEST-CPP: } // namespace a
//
// CHECK-OLD-TEST-EMPTY: {{^}}{{$}}
// CHECK-OLD-TEST: {{^}}{{$}}
4 changes: 2 additions & 2 deletions clang-tools-extra/test/clang-move/move-enum-decl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
// RUN: cp %S/Inputs/enum.h %T/move-enum/enum.h
// RUN: echo '#include "enum.h"' > %T/move-enum/enum.cpp
// RUN: clang-move -names="a::C::E3" -new_cc=%T/move-enum/new_test.cpp -new_header=%T/move-enum/new_test.h -old_cc=%T/move-enum/enum.cpp -old_header=%T/move-enum/enum.h %T/move-enum/enum.cpp -- -std=c++11
// RUN: FileCheck -input-file=%T/move-enum/new_test.h -allow-empty -check-prefix=CHECK-EMPTY %s
// RUN: FileCheck -input-file=%T/move-enum/new_test.h -allow-empty -check-prefix=CHECK-CLEAN %s

// CHECK-EMPTY: {{^}}{{$}}
// CHECK-CLEAN: {{^}}{{$}}
4 changes: 2 additions & 2 deletions clang-tools-extra/test/clang-move/move-function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
//
// RUN: cat %S/Inputs/function_test.h > %T/move-function/function_test.h
// RUN: cat %S/Inputs/function_test.cpp > %T/move-function/function_test.cpp
// RUN: clang-move -names="A::f" -new_header=%T/move-function/new_function_test.h -new_cc=%T/move-function/new_function_test.cpp -old_header=../move-function/function_test.h -old_cc=../move-function/function_test.cpp %T/move-function/function_test.cpp -dump_result -- | FileCheck %s -check-prefix=CHECK-EMPTY
// RUN: clang-move -names="A::f" -new_header=%T/move-function/new_function_test.h -new_cc=%T/move-function/new_function_test.cpp -old_header=../move-function/function_test.h -old_cc=../move-function/function_test.cpp %T/move-function/function_test.cpp -dump_result -- | FileCheck %s -check-prefix=CHECK-CLEAN
//
// CHECK-EMPTY: [{{[[:space:]]*}}]
// CHECK-CLEAN: [{{[[:space:]]*}}]
//
// RUN: cat %S/Inputs/function_test.h > %T/move-function/function_test.h
// RUN: cat %S/Inputs/function_test.cpp > %T/move-function/function_test.cpp
Expand Down
4 changes: 2 additions & 2 deletions clang-tools-extra/test/clang-move/move-multiple-classes.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// RUN: mkdir -p %T/move-multiple-classes
// RUN: cp %S/Inputs/multiple_class_test* %T/move-multiple-classes/
// RUN: cd %T/move-multiple-classes
// RUN: clang-move -names="c::EnclosingMove5::Nested" -new_cc=%T/move-multiple-classes/new_multiple_class_test.cpp -new_header=%T/move-multiple-classes/new_multiple_class_test.h -old_cc=%T/move-multiple-classes/multiple_class_test.cpp -old_header=../move-multiple-classes/multiple_class_test.h -dump_result %T/move-multiple-classes/multiple_class_test.cpp -- -std=c++11| FileCheck %s -check-prefix=CHECK-EMPTY
// RUN: clang-move -names="c::EnclosingMove5::Nested" -new_cc=%T/move-multiple-classes/new_multiple_class_test.cpp -new_header=%T/move-multiple-classes/new_multiple_class_test.h -old_cc=%T/move-multiple-classes/multiple_class_test.cpp -old_header=../move-multiple-classes/multiple_class_test.h -dump_result %T/move-multiple-classes/multiple_class_test.cpp -- -std=c++11| FileCheck %s -check-prefix=CHECK-CLEAN
// RUN: clang-move -names="a::Move1, b::Move2,c::Move3,c::Move4,c::EnclosingMove5" -new_cc=%T/move-multiple-classes/new_multiple_class_test.cpp -new_header=%T/move-multiple-classes/new_multiple_class_test.h -old_cc=%T/move-multiple-classes/multiple_class_test.cpp -old_header=../move-multiple-classes/multiple_class_test.h %T/move-multiple-classes/multiple_class_test.cpp -- -std=c++11
// RUN: FileCheck -input-file=%T/move-multiple-classes/new_multiple_class_test.cpp -check-prefix=CHECK-NEW-TEST-CPP %s
// RUN: FileCheck -input-file=%T/move-multiple-classes/new_multiple_class_test.h -check-prefix=CHECK-NEW-TEST-H %s
// RUN: FileCheck -input-file=%T/move-multiple-classes/multiple_class_test.cpp -check-prefix=CHECK-OLD-TEST-CPP %s
// RUN: FileCheck -input-file=%T/move-multiple-classes/multiple_class_test.h -check-prefix=CHECK-OLD-TEST-H %s
//
// CHECK-EMPTY: [{{[[:space:]]*}}]
// CHECK-CLEAN: [{{[[:space:]]*}}]
//
// CHECK-OLD-TEST-H: namespace c {
// CHECK-OLD-TEST-H: class NoMove {
Expand Down
6 changes: 3 additions & 3 deletions clang-tools-extra/test/clang-move/move-template-class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// RUN: cp %S/Inputs/template_class_test* %T/move-template-class
// RUN: cd %T/move-template-class
// RUN: clang-move -names="A,B" -new_cc=%T/move-template-class/new_template_class_test.cpp -new_header=%T/move-template-class/new_template_class_test.h -old_cc=%T/move-template-class/template_class_test.cpp -old_header=../move-template-class/template_class_test.h %T/move-template-class/template_class_test.cpp --
// RUN: FileCheck -input-file=%T/move-template-class/template_class_test.cpp -check-prefix=CHECK-OLD-TEST-EMPTY -allow-empty %s
// RUN: FileCheck -input-file=%T/move-template-class/template_class_test.h -check-prefix=CHECK-OLD-TEST-EMPTY -allow-empty %s
// RUN: FileCheck -input-file=%T/move-template-class/template_class_test.cpp -check-prefix=CHECK-OLD-TEST -allow-empty %s
// RUN: FileCheck -input-file=%T/move-template-class/template_class_test.h -check-prefix=CHECK-OLD-TEST -allow-empty %s
// RUN: FileCheck -input-file=%T/move-template-class/new_template_class_test.cpp -check-prefix=CHECK-NEW-TEST-CPP-CASE1 %s
// RUN: FileCheck -input-file=%T/move-template-class/new_template_class_test.h -check-prefix=CHECK-NEW-TEST-H-CASE1 %s
//
Expand All @@ -15,7 +15,7 @@
// RUN: FileCheck -input-file=%T/move-template-class/new_template_class_test.cpp -check-prefix=CHECK-NEW-TEST-CPP-CASE2 %s
//
//
// CHECK-OLD-TEST-EMPTY: {{^}}{{$}}
// CHECK-OLD-TEST: {{^}}{{$}}
//
// CHECK-NEW-TEST-H-CASE1: #ifndef TEMPLATE_CLASS_TEST_H // comment 1
// CHECK-NEW-TEST-H-CASE1: #define TEMPLATE_CLASS_TEST_H
Expand Down
4 changes: 2 additions & 2 deletions clang-tools-extra/test/clang-move/move-type-alias.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@
// RUN: cp %S/Inputs/type_alias.h %T/move-type-alias/type_alias.h
// RUN: echo '#include "type_alias.h"' > %T/move-type-alias/type_alias.cpp
// RUN: clang-move -names="C::Int3" -new_cc=%T/move-type-alias/new_test.cpp -new_header=%T/move-type-alias/new_test.h -old_cc=%T/move-type-alias/type_alias.cpp -old_header=%T/move-type-alias/type_alias.h %T/move-type-alias/type_alias.cpp -- -std=c++11
// RUN: FileCheck -input-file=%T/move-type-alias/new_test.h -allow-empty -check-prefix=CHECK-EMPTY %s
// RUN: FileCheck -input-file=%T/move-type-alias/new_test.h -allow-empty -check-prefix=CHECK-CLEAN %s

// CHECK-EMPTY: {{^}}{{$}}
// CHECK-CLEAN: {{^}}{{$}}
6 changes: 3 additions & 3 deletions clang-tools-extra/test/clang-move/move-used-helper-decls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@
// RUN: clang-move -names="a::Class1, a::Class2, a::Class3, a::Class4, a::Class5, a::Class5, a::Class6, a::Class7, a::Fun1, a::Fun2, b::Fun3" -new_cc=%T/used-helper-decls/new_helper_decls_test.cpp -new_header=%T/used-helper-decls/new_helper_decls_test.h -old_cc=%T/used-helper-decls/helper_decls_test.cpp -old_header=../used-helper-decls/helper_decls_test.h %T/used-helper-decls/helper_decls_test.cpp -- -std=c++11
// RUN: FileCheck -input-file=%T/used-helper-decls/new_helper_decls_test.h -check-prefix=CHECK-NEW-H %s
// RUN: FileCheck -input-file=%T/used-helper-decls/new_helper_decls_test.cpp -check-prefix=CHECK-NEW-CPP %s
// RUN: FileCheck -input-file=%T/used-helper-decls/helper_decls_test.h -allow-empty -check-prefix=CHECK-EMPTY %s
// RUN: FileCheck -input-file=%T/used-helper-decls/helper_decls_test.cpp -allow-empty -check-prefix=CHECK-EMPTY %s
// RUN: FileCheck -input-file=%T/used-helper-decls/helper_decls_test.h -allow-empty -check-prefix=CHECK-CLEAN %s
// RUN: FileCheck -input-file=%T/used-helper-decls/helper_decls_test.cpp -allow-empty -check-prefix=CHECK-CLEAN %s


// CHECK-NEW-H: namespace a {
Expand Down Expand Up @@ -435,4 +435,4 @@
// CHECK-NEW-CPP-NEXT: } // namespace
// CHECK-NEW-CPP-NEXT: } // namespace b

// CHECK-EMPTY: {{^}}{{$}}
// CHECK-CLEAN: {{^}}{{$}}
6 changes: 3 additions & 3 deletions clang-tools-extra/test/clang-move/no-move-macro-helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
//
// RUN: FileCheck -input-file=%T/no-move-macro-helper/new_test.h -check-prefix=CHECK-NEW-TEST-CASE2-H %s
// RUN: FileCheck -input-file=%T/no-move-macro-helper/new_test.cpp -check-prefix=CHECK-NEW-TEST-CASE2-CPP %s
// RUN: FileCheck -input-file=%T/no-move-macro-helper/macro_helper_test.h -allow-empty -check-prefix=CHECK-EMPTY %s
// RUN: FileCheck -input-file=%T/no-move-macro-helper/macro_helper_test.cpp -allow-empty -check-prefix=CHECK-EMPTY %s
// RUN: FileCheck -input-file=%T/no-move-macro-helper/macro_helper_test.h -allow-empty -check-prefix=CHECK-CLEAN %s
// RUN: FileCheck -input-file=%T/no-move-macro-helper/macro_helper_test.cpp -allow-empty -check-prefix=CHECK-CLEAN %s

// CHECK-NEW-TEST-CASE2-H: class A {};
// CHECK-NEW-TEST-CASE2-H-NEXT:void f1();
Expand All @@ -40,4 +40,4 @@
// CHECK-NEW-TEST-CASE2-CPP: DEFINE(test)
// CHECK-NEW-TEST-CASE2-CPP: void f1() {}

// CHECK-EMPTY: {{^}}{{$}}
// CHECK-CLEAN: {{^}}{{$}}
2 changes: 1 addition & 1 deletion clang/test/CXX/special/class.temporary/p6.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -std=c++17 %s -triple x86_64-linux-gnu -emit-llvm -o - | FileCheck %s --implicit-check-not='call{{.*}}dtor'
// RUN: %clang_cc1 -std=c++23 %s -triple x86_64-linux-gnu -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK-CXX23,CHECK-CXX23-NEXT,CHECK-CXX23-LABEL
// RUN: %clang_cc1 -std=c++23 %s -triple x86_64-linux-gnu -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK-CXX23
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently there error only with that test.


namespace std {
typedef decltype(sizeof(int)) size_t;
Expand Down
6 changes: 3 additions & 3 deletions clang/test/CodeCompletion/ignore-ns-level-decls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void test() {
// CHECK-1-DAG: COMPLETION: baz : baz
// CHECK-1-DAG: COMPLETION: func : [#int#]func(<#int a#>, <#bar b#>, <#baz c#>)

// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-6):7 -no-code-completion-ns-level-decls %s -o - | FileCheck %s --allow-empty --check-prefix=CHECK-EMPTY
// CHECK-EMPTY-NOT: COMPLETION: bar : bar
// CHECK-EMPTY: {{^}}{{$}}
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-6):7 -no-code-completion-ns-level-decls %s -o - | FileCheck %s --allow-empty --check-prefix=CHECK-CLEAN
// CHECK-CLEAN-NOT: COMPLETION: bar : bar
// CHECK-CLEAN: {{^}}{{$}}
}
6 changes: 3 additions & 3 deletions clang/test/CodeGen/thinlto_backend.ll
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
; would not import f2
; RUN: touch %t4.thinlto.bc
; RUN: %clang -target x86_64-unknown-linux-gnu -O2 -o %t4.o -x ir %t1.o -c -fthinlto-index=%t4.thinlto.bc
; RUN: llvm-nm %t4.o | FileCheck --check-prefix=CHECK-OBJ-IGNORE-EMPTY %s
; CHECK-OBJ-IGNORE-EMPTY: T f1
; CHECK-OBJ-IGNORE-EMPTY: U f2
; RUN: llvm-nm %t4.o | FileCheck --check-prefix=CHECK-OBJ-IGNORE-CLEAN %s
; CHECK-OBJ-IGNORE-CLEAN: T f1
; CHECK-OBJ-IGNORE-CLEAN: U f2

; Ensure we don't fail with index and non-ThinLTO object file, and output must
; be empty file.
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGenObjC/constant-strings.m
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// REQUIRES: x86-registered-target

// RUN: %clang_cc1 -triple x86_64-macho -emit-llvm -o %t %s
// RUN: FileCheck --check-prefix=CHECK-NEXT < %t %s
// RUN: FileCheck --check-prefix=CHECK-ALIGN < %t %s

// Check that we set alignment 1 on the string.
//
// CHECK-NEXT: @.str = {{.*}}constant [13 x i8] c"Hello World!\00", section "__TEXT,__cstring,cstring_literals", align 1
// CHECK-ALIGN: @.str = {{.*}}constant [13 x i8] c"Hello World!\00", section "__TEXT,__cstring,cstring_literals", align 1

// RUN: %clang_cc1 -triple x86_64-macho -fobjc-runtime=gcc -emit-llvm -o %t %s
// RUN: FileCheck --check-prefix=CHECK-GNU < %t %s
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Driver/clang_f_opts.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@
// RUN: %clang -### -S -frounding-math %s 2>&1 | FileCheck -check-prefix=CHECK-ROUNDING-MATH %s
// CHECK-ROUNDING-MATH: "-cc1"
// CHECK-ROUNDING-MATH: "-frounding-math"
// CHECK-ROUNDING-MATH-NOT: "-fno-rounding-math"
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-ROUNDING-MATH-NOT %s
// CHECK-NO-ROUNDING-MATH: "-fno-rounding-math"
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-ROUNDING-MATH %s
// RUN: not %clang -### -S -ffp-model=imprecise %s 2>&1 | FileCheck -check-prefix=CHECK-FPMODEL %s
// CHECK-FPMODEL: unsupported argument 'imprecise' to option '-ffp-model='
// RUN: %clang -### -S -ffp-model=precise %s 2>&1 | FileCheck -check-prefix=IGNORE %s
Expand Down
6 changes: 3 additions & 3 deletions clang/test/Driver/darwin-version.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@
// CHECK-VERSION-TNO-OSV4: overriding '-miphoneos-version-min=10.1.0.1' option with '-target arm64-apple-ios10.1.0'

// RUN: %clang -target x86_64-apple-macos10.6 -mmacos-version-min=10.6 -c %s -### 2>&1 | \
// RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-SAME %s
// CHECK-VERSION-TNO-SAME-NOT: overriding
// CHECK-VERSION-TNO-SAME-NOT: argument unused during compilation
// RUN: FileCheck --check-prefix=CHECK-VERSION-SAME-TNO %s
// CHECK-VERSION-SAME-TNO-NOT: overriding
// CHECK-VERSION-SAME-TNO-NOT: argument unused during compilation

// Target with OS version is not overridden by -m<os>-version-min variables:

Expand Down
18 changes: 9 additions & 9 deletions clang/test/Driver/debug-prefix-map.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
// RUN: %clang -### -ffile-prefix-map=old=n=ew %s 2>&1 | FileCheck %s -check-prefix CHECK-MACRO-COMPLEX
// RUN: %clang -### -ffile-prefix-map=old=n=ew %s 2>&1 | FileCheck %s -check-prefix CHECK-COVERAGE-COMPLEX

// RUN: %clang -### -fdebug-prefix-map=old= %s 2>&1 | FileCheck %s -check-prefix CHECK-DEBUG-EMPTY
// RUN: %clang -### -fmacro-prefix-map=old= %s 2>&1 | FileCheck %s -check-prefix CHECK-MACRO-EMPTY
// RUN: %clang -### -fcoverage-prefix-map=old= %s 2>&1 | FileCheck %s -check-prefix CHECK-COVERAGE-EMPTY
// RUN: %clang -### -ffile-prefix-map=old= %s 2>&1 | FileCheck %s -check-prefix CHECK-DEBUG-EMPTY
// RUN: %clang -### -ffile-prefix-map=old= %s 2>&1 | FileCheck %s -check-prefix CHECK-MACRO-EMPTY
// RUN: %clang -### -ffile-prefix-map=old= %s 2>&1 | FileCheck %s -check-prefix CHECK-COVERAGE-EMPTY
// RUN: %clang -### -fdebug-prefix-map=old= %s 2>&1 | FileCheck %s -check-prefix CHECK-DEBUG-CLEAN
// RUN: %clang -### -fmacro-prefix-map=old= %s 2>&1 | FileCheck %s -check-prefix CHECK-MACRO-CLEAN
// RUN: %clang -### -fcoverage-prefix-map=old= %s 2>&1 | FileCheck %s -check-prefix CHECK-COVERAGE-CLEAN
// RUN: %clang -### -ffile-prefix-map=old= %s 2>&1 | FileCheck %s -check-prefix CHECK-DEBUG-CLEAN
// RUN: %clang -### -ffile-prefix-map=old= %s 2>&1 | FileCheck %s -check-prefix CHECK-MACRO-CLEAN
// RUN: %clang -### -ffile-prefix-map=old= %s 2>&1 | FileCheck %s -check-prefix CHECK-COVERAGE-CLEAN

// CHECK-DEBUG-INVALID: error: invalid argument 'old' to -fdebug-prefix-map
// CHECK-MACRO-INVALID: error: invalid argument 'old' to -fmacro-prefix-map
Expand All @@ -34,6 +34,6 @@
// CHECK-DEBUG-COMPLEX: fdebug-prefix-map=old=n=ew
// CHECK-MACRO-COMPLEX: fmacro-prefix-map=old=n=ew
// CHECK-COVERAGE-COMPLEX: fcoverage-prefix-map=old=n=ew
// CHECK-DEBUG-EMPTY: fdebug-prefix-map=old=
// CHECK-MACRO-EMPTY: fmacro-prefix-map=old=
// CHECK-COVERAGE-EMPTY: fcoverage-prefix-map=old=
// CHECK-DEBUG-CLEAN: fdebug-prefix-map=old=
// CHECK-MACRO-CLEAN: fmacro-prefix-map=old=
// CHECK-COVERAGE-CLEAN: fcoverage-prefix-map=old=
4 changes: 2 additions & 2 deletions clang/test/PCH/badpch.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: not %clang_cc1 -fsyntax-only -include-pch %S/Inputs/badpch-empty.h.gch %s 2>&1 | FileCheck -check-prefix=CHECK-EMPTY %s
// RUN: not %clang_cc1 -fsyntax-only -include-pch %S/Inputs/badpch-empty.h.gch %s 2>&1 | FileCheck -check-prefix=CHECK-CLEAN %s
// RUN: not %clang_cc1 -fsyntax-only -include-pch %S/Inputs/badpch-dir.h.gch %s 2>&1 | FileCheck -check-prefix=CHECK-DIR %s

// The purpose of this test is to verify that various invalid PCH files are
Expand All @@ -9,5 +9,5 @@
// message still did not contain the name of the PCH. Also, r149918 which was
// submitted on 2012-02-06 introduced a segfault in the case where the PCH is
// an empty file and clang was built with assertions.
// CHECK-EMPTY: error: input is not a PCH file: '{{.*[/\\]}}badpch-empty.h.gch'
// CHECK-CLEAN: error: input is not a PCH file: '{{.*[/\\]}}badpch-empty.h.gch'
// CHECK-DIR:error: no suitable precompiled header file found in directory '{{.*[/\\]}}badpch-dir.h.gch
4 changes: 2 additions & 2 deletions lld/test/ELF/debug-names-bad.s
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

# RUN: sed '/Header: name count/s/[0-9]/4/' %S/Inputs/debug-names-a.s > bad-name-count.s
# RUN: llvm-mc -filetype=obj -triple=x86_64 bad-name-count.s -o bad-name-count.o
# RUN: not ld.lld --debug-names bad-name-count.o 2>&1 | FileCheck %s --check-prefix=BAD-NAME-COUNT --implicit-check-not=error:
# RUN: not ld.lld --debug-names bad-name-count.o 2>&1 | FileCheck %s --check-prefix=BAD-NAME-NUM --implicit-check-not=error:

## Test errors in offsets.
# BAD-NAME-COUNT: error: bad-name-count.o:(.debug_names): Section too small: cannot read abbreviations.
# BAD-NAME-NUM: error: bad-name-count.o:(.debug_names): Section too small: cannot read abbreviations.

# RUN: sed '/Offset in Bucket/s/long/byte/' %S/Inputs/debug-names-a.s > entry-offset-in-byte.s
# RUN: llvm-mc -filetype=obj -triple=x86_64 entry-offset-in-byte.s -o entry-offset-in-byte.o
Expand Down
Loading
Loading