Skip to content

Commit 8924ba3

Browse files
committed
[NFC][clang] Inclusive terms: replace uses of blacklist in clang/test/
Replace filenames, variable names, check prefixes uses of blacklist with ignore list. Reviewed By: jkorous Differential Revision: https://reviews.llvm.org/D113211
1 parent ec4a2c9 commit 8924ba3

16 files changed

+138
-138
lines changed

clang/test/CodeGen/Inputs/sanitizer-blacklist-vfsoverlay.yaml renamed to clang/test/CodeGen/Inputs/sanitizer-ignorelist-vfsoverlay.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
'roots': [
44
{ 'name': '@DIR@', 'type': 'directory',
55
'contents': [
6-
{ 'name': 'only-virtual-file.blacklist', 'type': 'file',
6+
{ 'name': 'only-virtual-file.ignorelist', 'type': 'file',
77
'external-contents': '@REAL_FILE@'
88
},
9-
{ 'name': 'invalid-virtual-file.blacklist', 'type': 'file',
9+
{ 'name': 'invalid-virtual-file.ignorelist', 'type': 'file',
1010
'external-contents': '@NONEXISTENT_FILE@'
1111
}
1212
]

clang/test/CodeGen/address-safety-attr.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ int DefinedInDifferentFile(int *a);
66
// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin -disable-O0-optnone -emit-llvm -o - %s -include %t.extra-source.cpp | FileCheck -check-prefix=WITHOUT %s
77
// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin -disable-O0-optnone -emit-llvm -o - %s -include %t.extra-source.cpp -fsanitize=address | FileCheck -check-prefix=ASAN %s
88

9-
// RUN: echo "fun:*BlacklistedFunction*" > %t.func.blacklist
10-
// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin -disable-O0-optnone -emit-llvm -o - %s -include %t.extra-source.cpp -fsanitize=address -fsanitize-blacklist=%t.func.blacklist | FileCheck -check-prefix=BLFUNC %s
9+
// RUN: echo "fun:*IgnorelistedFunction*" > %t.func.ignorelist
10+
// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin -disable-O0-optnone -emit-llvm -o - %s -include %t.extra-source.cpp -fsanitize=address -fsanitize-ignorelist=%t.func.ignorelist | FileCheck -check-prefix=BLFUNC %s
1111

12-
// The blacklist file uses regexps, so escape backslashes, which are common in
12+
// The ignorelist file uses regexps, so escape backslashes, which are common in
1313
// Windows paths.
14-
// RUN: echo "src:%s" | sed -e 's/\\/\\\\/g' > %t.file.blacklist
15-
// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin -disable-O0-optnone -emit-llvm -o - %s -include %t.extra-source.cpp -fsanitize=address -fsanitize-blacklist=%t.file.blacklist | FileCheck -check-prefix=BLFILE %s
14+
// RUN: echo "src:%s" | sed -e 's/\\/\\\\/g' > %t.file.ignorelist
15+
// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin -disable-O0-optnone -emit-llvm -o - %s -include %t.extra-source.cpp -fsanitize=address -fsanitize-ignorelist=%t.file.ignorelist | FileCheck -check-prefix=BLFILE %s
1616

1717
// The sanitize_address attribute should be attached to functions
1818
// when AddressSanitizer is enabled, unless no_sanitize_address attribute
@@ -25,7 +25,7 @@ int DefinedInDifferentFile(int *a);
2525
// ASAN: DefinedInDifferentFile{{.*}} [[WITH:#[0-9]+]]
2626

2727
// Check that functions generated for global in different source file are
28-
// not blacklisted.
28+
// not ignorelisted.
2929
// WITHOUT: @__cxx_global_var_init{{.*}}[[NOATTR:#[0-9]+]]
3030
// WITHOUT: @__cxx_global_array_dtor{{.*}}[[NOATTR]]
3131
// BLFILE: @__cxx_global_var_init{{.*}}[[WITH:#[0-9]+]]
@@ -86,11 +86,11 @@ int NoAddressSafety6(int *a) { return *a; }
8686
// ASAN: AddressSafetyOk{{.*}}) [[WITH:#[0-9]+]]
8787
int AddressSafetyOk(int *a) { return *a; }
8888

89-
// WITHOUT: BlacklistedFunction{{.*}}) [[NOATTR]]
90-
// BLFILE: BlacklistedFunction{{.*}}) [[NOATTR]]
91-
// BLFUNC: BlacklistedFunction{{.*}}) [[NOATTR]]
92-
// ASAN: BlacklistedFunction{{.*}}) [[WITH]]
93-
int BlacklistedFunction(int *a) { return *a; }
89+
// WITHOUT: IgnorelistedFunction{{.*}}) [[NOATTR]]
90+
// BLFILE: IgnorelistedFunction{{.*}}) [[NOATTR]]
91+
// BLFUNC: IgnorelistedFunction{{.*}}) [[NOATTR]]
92+
// ASAN: IgnorelistedFunction{{.*}}) [[WITH]]
93+
int IgnorelistedFunction(int *a) { return *a; }
9494

9595
#define GENERATE_FUNC(name) \
9696
int name(int *a) { return *a; }

clang/test/CodeGen/asan-globals.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// RUN: echo "int extra_global;" > %t.extra-source.cpp
2-
// RUN: echo "global:*blacklisted_global*" > %t.blacklist
3-
// RUN: %clang_cc1 -include %t.extra-source.cpp -fsanitize=address -fsanitize-blacklist=%t.blacklist -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,ASAN
4-
// RUN: %clang_cc1 -include %t.extra-source.cpp -fsanitize=kernel-address -fsanitize-blacklist=%t.blacklist -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,KASAN
5-
// The blacklist file uses regexps, so Windows path backslashes.
6-
// RUN: echo "src:%s" | sed -e 's/\\/\\\\/g' > %t.blacklist-src
7-
// RUN: %clang_cc1 -include %t.extra-source.cpp -fsanitize=address -fsanitize-blacklist=%t.blacklist-src -emit-llvm -o - %s | FileCheck %s --check-prefix=BLACKLIST-SRC
8-
// RUN: %clang_cc1 -include %t.extra-source.cpp -fsanitize=kernel-address -fsanitize-blacklist=%t.blacklist-src -emit-llvm -o - %s | FileCheck %s --check-prefix=BLACKLIST-SRC
2+
// RUN: echo "global:*ignorelisted_global*" > %t.ignorelist
3+
// RUN: %clang_cc1 -include %t.extra-source.cpp -fsanitize=address -fsanitize-ignorelist=%t.ignorelist -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,ASAN
4+
// RUN: %clang_cc1 -include %t.extra-source.cpp -fsanitize=kernel-address -fsanitize-ignorelist=%t.ignorelist -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,KASAN
5+
// The ignorelist file uses regexps, so Windows path backslashes.
6+
// RUN: echo "src:%s" | sed -e 's/\\/\\\\/g' > %t.ignorelist-src
7+
// RUN: %clang_cc1 -include %t.extra-source.cpp -fsanitize=address -fsanitize-ignorelist=%t.ignorelist-src -emit-llvm -o - %s | FileCheck %s --check-prefix=IGNORELIST-SRC
8+
// RUN: %clang_cc1 -include %t.extra-source.cpp -fsanitize=kernel-address -fsanitize-ignorelist=%t.ignorelist-src -emit-llvm -o - %s | FileCheck %s --check-prefix=IGNORELIST-SRC
99

1010
int global;
1111
int dyn_init_global = global;
1212
int __attribute__((no_sanitize("address"))) attributed_global;
13-
int blacklisted_global;
13+
int ignorelisted_global;
1414

1515
int __attribute__((section("__DATA, __common"))) sectioned_global; // KASAN - ignore globals in a section
1616
extern "C" {
@@ -50,15 +50,15 @@ void func() {
5050
// UWTABLE: attributes #[[#ATTR]] = { nounwind uwtable }
5151
// UWTABLE: ![[#]] = !{i32 7, !"uwtable", i32 1}
5252

53-
// CHECK: !llvm.asan.globals = !{![[EXTRA_GLOBAL:[0-9]+]], ![[GLOBAL:[0-9]+]], ![[DYN_INIT_GLOBAL:[0-9]+]], ![[ATTR_GLOBAL:[0-9]+]], ![[BLACKLISTED_GLOBAL:[0-9]+]], ![[SECTIONED_GLOBAL:[0-9]+]], ![[SPECIAL_GLOBAL:[0-9]+]], ![[STATIC_VAR:[0-9]+]], ![[LITERAL:[0-9]+]]}
53+
// CHECK: !llvm.asan.globals = !{![[EXTRA_GLOBAL:[0-9]+]], ![[GLOBAL:[0-9]+]], ![[DYN_INIT_GLOBAL:[0-9]+]], ![[ATTR_GLOBAL:[0-9]+]], ![[IGNORELISTED_GLOBAL:[0-9]+]], ![[SECTIONED_GLOBAL:[0-9]+]], ![[SPECIAL_GLOBAL:[0-9]+]], ![[STATIC_VAR:[0-9]+]], ![[LITERAL:[0-9]+]]}
5454
// CHECK: ![[EXTRA_GLOBAL]] = !{{{.*}} ![[EXTRA_GLOBAL_LOC:[0-9]+]], !"extra_global", i1 false, i1 false}
5555
// CHECK: ![[EXTRA_GLOBAL_LOC]] = !{!"{{.*}}extra-source.cpp", i32 1, i32 5}
5656
// CHECK: ![[GLOBAL]] = !{{{.*}} ![[GLOBAL_LOC:[0-9]+]], !"global", i1 false, i1 false}
5757
// CHECK: ![[GLOBAL_LOC]] = !{!"{{.*}}asan-globals.cpp", i32 10, i32 5}
5858
// CHECK: ![[DYN_INIT_GLOBAL]] = !{{{.*}} ![[DYN_INIT_LOC:[0-9]+]], !"dyn_init_global", i1 true, i1 false}
5959
// CHECK: ![[DYN_INIT_LOC]] = !{!"{{.*}}asan-globals.cpp", i32 11, i32 5}
6060
// CHECK: ![[ATTR_GLOBAL]] = !{{{.*}}, null, null, i1 false, i1 true}
61-
// CHECK: ![[BLACKLISTED_GLOBAL]] = !{{{.*}}, null, null, i1 false, i1 true}
61+
// CHECK: ![[IGNORELISTED_GLOBAL]] = !{{{.*}}, null, null, i1 false, i1 true}
6262
// CHECK: ![[SECTIONED_GLOBAL]] = !{{{.*}} ![[SECTIONED_GLOBAL_LOC:[0-9]+]], !"sectioned_global", i1 false, i1 false}
6363
// CHECK: ![[SECTIONED_GLOBAL_LOC]] = !{!"{{.*}}asan-globals.cpp", i32 15, i32 50}
6464
// CHECK: ![[SPECIAL_GLOBAL]] = !{{{.*}} ![[SPECIAL_GLOBAL_LOC:[0-9]+]], !"__special_global", i1 false, i1 false}
@@ -68,14 +68,14 @@ void func() {
6868
// CHECK: ![[LITERAL]] = !{{{.*}} ![[LITERAL_LOC:[0-9]+]], !"<string literal>", i1 false, i1 false}
6969
// CHECK: ![[LITERAL_LOC]] = !{!"{{.*}}asan-globals.cpp", i32 22, i32 25}
7070

71-
// BLACKLIST-SRC: !llvm.asan.globals = !{![[EXTRA_GLOBAL:[0-9]+]], ![[GLOBAL:[0-9]+]], ![[DYN_INIT_GLOBAL:[0-9]+]], ![[ATTR_GLOBAL:[0-9]+]], ![[BLACKLISTED_GLOBAL:[0-9]+]], ![[SECTIONED_GLOBAL:[0-9]+]], ![[SPECIAL_GLOBAL:[0-9]+]], ![[STATIC_VAR:[0-9]+]], ![[LITERAL:[0-9]+]]}
72-
// BLACKLIST-SRC: ![[EXTRA_GLOBAL]] = !{{{.*}} ![[EXTRA_GLOBAL_LOC:[0-9]+]], !"extra_global", i1 false, i1 false}
73-
// BLACKLIST-SRC: ![[EXTRA_GLOBAL_LOC]] = !{!"{{.*}}extra-source.cpp", i32 1, i32 5}
74-
// BLACKLIST-SRC: ![[GLOBAL]] = !{{{.*}} null, null, i1 false, i1 true}
75-
// BLACKLIST-SRC: ![[DYN_INIT_GLOBAL]] = !{{{.*}} null, null, i1 true, i1 true}
76-
// BLACKLIST-SRC: ![[ATTR_GLOBAL]] = !{{{.*}}, null, null, i1 false, i1 true}
77-
// BLACKLIST-SRC: ![[BLACKLISTED_GLOBAL]] = !{{{.*}}, null, null, i1 false, i1 true}
78-
// BLACKLIST-SRC: ![[SECTIONED_GLOBAL]] = !{{{.*}} null, null, i1 false, i1 true}
79-
// BLACKLIST-SRC: ![[SPECIAL_GLOBAL]] = !{{{.*}} null, null, i1 false, i1 true}
80-
// BLACKLIST-SRC: ![[STATIC_VAR]] = !{{{.*}} null, null, i1 false, i1 true}
81-
// BLACKLIST-SRC: ![[LITERAL]] = !{{{.*}} null, null, i1 false, i1 true}
71+
// IGNORELIST-SRC: !llvm.asan.globals = !{![[EXTRA_GLOBAL:[0-9]+]], ![[GLOBAL:[0-9]+]], ![[DYN_INIT_GLOBAL:[0-9]+]], ![[ATTR_GLOBAL:[0-9]+]], ![[IGNORELISTED_GLOBAL:[0-9]+]], ![[SECTIONED_GLOBAL:[0-9]+]], ![[SPECIAL_GLOBAL:[0-9]+]], ![[STATIC_VAR:[0-9]+]], ![[LITERAL:[0-9]+]]}
72+
// IGNORELIST-SRC: ![[EXTRA_GLOBAL]] = !{{{.*}} ![[EXTRA_GLOBAL_LOC:[0-9]+]], !"extra_global", i1 false, i1 false}
73+
// IGNORELIST-SRC: ![[EXTRA_GLOBAL_LOC]] = !{!"{{.*}}extra-source.cpp", i32 1, i32 5}
74+
// IGNORELIST-SRC: ![[GLOBAL]] = !{{{.*}} null, null, i1 false, i1 true}
75+
// IGNORELIST-SRC: ![[DYN_INIT_GLOBAL]] = !{{{.*}} null, null, i1 true, i1 true}
76+
// IGNORELIST-SRC: ![[ATTR_GLOBAL]] = !{{{.*}}, null, null, i1 false, i1 true}
77+
// IGNORELIST-SRC: ![[IGNORELISTED_GLOBAL]] = !{{{.*}}, null, null, i1 false, i1 true}
78+
// IGNORELIST-SRC: ![[SECTIONED_GLOBAL]] = !{{{.*}} null, null, i1 false, i1 true}
79+
// IGNORELIST-SRC: ![[SPECIAL_GLOBAL]] = !{{{.*}} null, null, i1 false, i1 true}
80+
// IGNORELIST-SRC: ![[STATIC_VAR]] = !{{{.*}} null, null, i1 false, i1 true}
81+
// IGNORELIST-SRC: ![[LITERAL]] = !{{{.*}} null, null, i1 false, i1 true}

clang/test/CodeGen/catch-alignment-assumption-blacklist.c renamed to clang/test/CodeGen/catch-alignment-assumption-ignorelist.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ void *baseline(void *x) {
66
return __builtin_assume_aligned(x, 1);
77
}
88

9-
// CHECK-LABEL: blacklist_0
10-
__attribute__((no_sanitize("undefined"))) void *blacklist_0(void *x) {
9+
// CHECK-LABEL: ignorelist_0
10+
__attribute__((no_sanitize("undefined"))) void *ignorelist_0(void *x) {
1111
return __builtin_assume_aligned(x, 1);
1212
}
1313

14-
// CHECK-LABEL: blacklist_1
15-
__attribute__((no_sanitize("alignment"))) void *blacklist_1(void *x) {
14+
// CHECK-LABEL: ignorelist_1
15+
__attribute__((no_sanitize("alignment"))) void *ignorelist_1(void *x) {
1616
return __builtin_assume_aligned(x, 1);
1717
}
1818

clang/test/CodeGen/catch-implicit-integer-sign-changes-true-negatives.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@
1010
// Sanitization is explicitly disabled.
1111
// ========================================================================== //
1212

13-
// CHECK-LABEL: @blacklist_0
14-
__attribute__((no_sanitize("undefined"))) unsigned int blacklist_0(signed int src) {
13+
// CHECK-LABEL: @ignorelist_0
14+
__attribute__((no_sanitize("undefined"))) unsigned int ignorelist_0(signed int src) {
1515
// We are not in "undefined" group, so that doesn't work.
1616
// CHECK-SANITIZE: call
1717
return src;
1818
}
1919

20-
// CHECK-LABEL: @blacklist_1
21-
__attribute__((no_sanitize("integer"))) unsigned int blacklist_1(signed int src) {
20+
// CHECK-LABEL: @ignorelist_1
21+
__attribute__((no_sanitize("integer"))) unsigned int ignorelist_1(signed int src) {
2222
return src;
2323
}
2424

25-
// CHECK-LABEL: @blacklist_2
26-
__attribute__((no_sanitize("implicit-conversion"))) unsigned int blacklist_2(signed int src) {
25+
// CHECK-LABEL: @ignorelist_2
26+
__attribute__((no_sanitize("implicit-conversion"))) unsigned int ignorelist_2(signed int src) {
2727
return src;
2828
}
2929

30-
// CHECK-LABEL: @blacklist_3
31-
__attribute__((no_sanitize("implicit-integer-sign-change"))) unsigned int blacklist_3(signed int src) {
30+
// CHECK-LABEL: @ignorelist_3
31+
__attribute__((no_sanitize("implicit-integer-sign-change"))) unsigned int ignorelist_3(signed int src) {
3232
return src;
3333
}
3434

clang/test/CodeGen/catch-implicit-integer-truncations-basics-negatives.c

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,36 @@
99
// Unsigned case.
1010
//----------------------------------------------------------------------------//
1111

12-
// CHECK-LABEL: @blacklist_0_convert_unsigned_int_to_unsigned_char
13-
__attribute__((no_sanitize("undefined"))) unsigned char blacklist_0_convert_unsigned_int_to_unsigned_char(unsigned int x) {
12+
// CHECK-LABEL: @ignorelist_0_convert_unsigned_int_to_unsigned_char
13+
__attribute__((no_sanitize("undefined"))) unsigned char ignorelist_0_convert_unsigned_int_to_unsigned_char(unsigned int x) {
1414
// We are not in "undefined" group, so that doesn't work.
1515
// CHECK: call void @__ubsan_handle_implicit_conversion(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_100_UNSIGNED_TRUNCATION]] to i8*)
1616
#line 100
1717
return x;
1818
}
1919

20-
// CHECK-LABEL: @blacklist_1_convert_unsigned_int_to_unsigned_char
21-
__attribute__((no_sanitize("integer"))) unsigned char blacklist_1_convert_unsigned_int_to_unsigned_char(unsigned int x) {
20+
// CHECK-LABEL: @ignorelist_1_convert_unsigned_int_to_unsigned_char
21+
__attribute__((no_sanitize("integer"))) unsigned char ignorelist_1_convert_unsigned_int_to_unsigned_char(unsigned int x) {
2222
return x;
2323
}
2424

25-
// CHECK-LABEL: @blacklist_2_convert_unsigned_int_to_unsigned_char
26-
__attribute__((no_sanitize("implicit-conversion"))) unsigned char blacklist_2_convert_unsigned_int_to_unsigned_char(unsigned int x) {
25+
// CHECK-LABEL: @ignorelist_2_convert_unsigned_int_to_unsigned_char
26+
__attribute__((no_sanitize("implicit-conversion"))) unsigned char ignorelist_2_convert_unsigned_int_to_unsigned_char(unsigned int x) {
2727
return x;
2828
}
2929

30-
// CHECK-LABEL: @blacklist_3_convert_unsigned_int_to_unsigned_char
31-
__attribute__((no_sanitize("implicit-integer-truncation"))) unsigned char blacklist_3_convert_unsigned_int_to_unsigned_char(unsigned int x) {
30+
// CHECK-LABEL: @ignorelist_3_convert_unsigned_int_to_unsigned_char
31+
__attribute__((no_sanitize("implicit-integer-truncation"))) unsigned char ignorelist_3_convert_unsigned_int_to_unsigned_char(unsigned int x) {
3232
return x;
3333
}
3434

35-
// CHECK-LABEL: @blacklist_4_convert_unsigned_int_to_unsigned_char
36-
__attribute__((no_sanitize("implicit-unsigned-integer-truncation"))) unsigned char blacklist_4_convert_unsigned_int_to_unsigned_char(unsigned int x) {
35+
// CHECK-LABEL: @ignorelist_4_convert_unsigned_int_to_unsigned_char
36+
__attribute__((no_sanitize("implicit-unsigned-integer-truncation"))) unsigned char ignorelist_4_convert_unsigned_int_to_unsigned_char(unsigned int x) {
3737
return x;
3838
}
3939

40-
// CHECK-LABEL: @blacklist_5_convert_unsigned_int_to_unsigned_char
41-
__attribute__((no_sanitize("implicit-signed-integer-truncation"))) unsigned char blacklist_5_convert_unsigned_int_to_unsigned_char(unsigned int x) {
40+
// CHECK-LABEL: @ignorelist_5_convert_unsigned_int_to_unsigned_char
41+
__attribute__((no_sanitize("implicit-signed-integer-truncation"))) unsigned char ignorelist_5_convert_unsigned_int_to_unsigned_char(unsigned int x) {
4242
// This is an unsigned truncation, not signed-one.
4343
// CHECK: call void @__ubsan_handle_implicit_conversion(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_200_UNSIGNED_TRUNCATION]] to i8*)
4444
#line 200
@@ -49,36 +49,36 @@ __attribute__((no_sanitize("implicit-signed-integer-truncation"))) unsigned char
4949
// Signed case.
5050
//----------------------------------------------------------------------------//
5151

52-
// CHECK-LABEL: @blacklist_0_convert_signed_int_to_signed_char
53-
__attribute__((no_sanitize("undefined"))) signed char blacklist_0_convert_signed_int_to_signed_char(signed int x) {
52+
// CHECK-LABEL: @ignorelist_0_convert_signed_int_to_signed_char
53+
__attribute__((no_sanitize("undefined"))) signed char ignorelist_0_convert_signed_int_to_signed_char(signed int x) {
5454
// We are not in "undefined" group, so that doesn't work.
5555
// CHECK: call void @__ubsan_handle_implicit_conversion(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_300_SIGNED_TRUNCATION]] to i8*)
5656
#line 300
5757
return x;
5858
}
5959

60-
// CHECK-LABEL: @blacklist_1_convert_signed_int_to_signed_char
61-
__attribute__((no_sanitize("integer"))) signed char blacklist_1_convert_signed_int_to_signed_char(signed int x) {
60+
// CHECK-LABEL: @ignorelist_1_convert_signed_int_to_signed_char
61+
__attribute__((no_sanitize("integer"))) signed char ignorelist_1_convert_signed_int_to_signed_char(signed int x) {
6262
return x;
6363
}
6464

65-
// CHECK-LABEL: @blacklist_2_convert_signed_int_to_signed_char
66-
__attribute__((no_sanitize("implicit-conversion"))) signed char blacklist_2_convert_signed_int_to_signed_char(signed int x) {
65+
// CHECK-LABEL: @ignorelist_2_convert_signed_int_to_signed_char
66+
__attribute__((no_sanitize("implicit-conversion"))) signed char ignorelist_2_convert_signed_int_to_signed_char(signed int x) {
6767
return x;
6868
}
6969

70-
// CHECK-LABEL: @blacklist_3_convert_signed_int_to_signed_char
71-
__attribute__((no_sanitize("implicit-integer-truncation"))) signed char blacklist_3_convert_signed_int_to_signed_char(signed int x) {
70+
// CHECK-LABEL: @ignorelist_3_convert_signed_int_to_signed_char
71+
__attribute__((no_sanitize("implicit-integer-truncation"))) signed char ignorelist_3_convert_signed_int_to_signed_char(signed int x) {
7272
return x;
7373
}
7474

75-
// CHECK-LABEL: @blacklist_4_convert_signed_int_to_signed_char
76-
__attribute__((no_sanitize("implicit-signed-integer-truncation"))) signed char blacklist_4_convert_signed_int_to_signed_char(signed int x) {
75+
// CHECK-LABEL: @ignorelist_4_convert_signed_int_to_signed_char
76+
__attribute__((no_sanitize("implicit-signed-integer-truncation"))) signed char ignorelist_4_convert_signed_int_to_signed_char(signed int x) {
7777
return x;
7878
}
7979

80-
// CHECK-LABEL: @blacklist_5_convert_signed_int_to_signed_char
81-
__attribute__((no_sanitize("implicit-unsigned-integer-truncation"))) signed char blacklist_5_convert_signed_int_to_signed_char(signed int x) {
80+
// CHECK-LABEL: @ignorelist_5_convert_signed_int_to_signed_char
81+
__attribute__((no_sanitize("implicit-unsigned-integer-truncation"))) signed char ignorelist_5_convert_signed_int_to_signed_char(signed int x) {
8282
// This is an signed truncation, not unsigned-one.
8383
// CHECK: call void @__ubsan_handle_implicit_conversion(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_400_SIGNED_TRUNCATION]] to i8*)
8484
#line 400

clang/test/CodeGen/catch-implicit-integer-truncations.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,25 +158,25 @@ unsigned char explicit_conversion_interference1(unsigned int c) {
158158
// Sanitization is explicitly disabled.
159159
// ========================================================================== //
160160

161-
// CHECK-LABEL: @blacklist_0
162-
__attribute__((no_sanitize("undefined"))) unsigned char blacklist_0(unsigned int src) {
161+
// CHECK-LABEL: @ignorelist_0
162+
__attribute__((no_sanitize("undefined"))) unsigned char ignorelist_0(unsigned int src) {
163163
// We are not in "undefined" group, so that doesn't work.
164164
// CHECK-SANITIZE: call
165165
return src;
166166
}
167167

168-
// CHECK-LABEL: @blacklist_1
169-
__attribute__((no_sanitize("integer"))) unsigned char blacklist_1(unsigned int src) {
168+
// CHECK-LABEL: @ignorelist_1
169+
__attribute__((no_sanitize("integer"))) unsigned char ignorelist_1(unsigned int src) {
170170
return src;
171171
}
172172

173-
// CHECK-LABEL: @blacklist_2
174-
__attribute__((no_sanitize("implicit-conversion"))) unsigned char blacklist_2(unsigned int src) {
173+
// CHECK-LABEL: @ignorelist_2
174+
__attribute__((no_sanitize("implicit-conversion"))) unsigned char ignorelist_2(unsigned int src) {
175175
return src;
176176
}
177177

178-
// CHECK-LABEL: @blacklist_3
179-
__attribute__((no_sanitize("implicit-integer-truncation"))) unsigned char blacklist_3(unsigned int src) {
178+
// CHECK-LABEL: @ignorelist_3
179+
__attribute__((no_sanitize("implicit-integer-truncation"))) unsigned char ignorelist_3(unsigned int src) {
180180
return src;
181181
}
182182

0 commit comments

Comments
 (0)