]> granicus.if.org Git - clang/commitdiff
[NFC] Some small test updates for Implicit Conversion sanitizer.
authorRoman Lebedev <lebedev.ri@gmail.com>
Fri, 17 Aug 2018 07:33:25 +0000 (07:33 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Fri, 17 Aug 2018 07:33:25 +0000 (07:33 +0000)
Split off from D50250.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339995 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/catch-implicit-integer-conversions-basics.c [new file with mode: 0644]
test/CodeGen/catch-implicit-integer-truncations-basics.c [new file with mode: 0644]
test/CodeGen/catch-implicit-integer-truncations.c

diff --git a/test/CodeGen/catch-implicit-integer-conversions-basics.c b/test/CodeGen/catch-implicit-integer-conversions-basics.c
new file mode 100644 (file)
index 0000000..055ddd5
--- /dev/null
@@ -0,0 +1,131 @@
+// RUN: %clang_cc1 -fsanitize=implicit-integer-truncation -fsanitize-recover=implicit-integer-truncation -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s -implicit-check-not="call void @__ubsan_handle_implicit_conversion" --check-prefixes=CHECK
+
+// Test plan:
+//  * Two types - int and char
+//  * Two signs - signed and unsigned
+//  * Square that - we have input and output types.
+// Thus, there are total of (2*2)^2 == 16 tests.
+// These are all the possible variations/combinations of casts.
+// However, not all of them should result in the check.
+// So here, we *only* check which should and which should not result in checks.
+
+// CHECK-DAG: @[[LINE_500_TRUNCATION:.*]] = {{.*}}, i32 500, i32 10 }, {{.*}}, {{.*}}, i8 0 }
+// CHECK-DAG: @[[LINE_1100_TRUNCATION:.*]] = {{.*}}, i32 1100, i32 10 }, {{.*}}, {{.*}}, i8 0 }
+// CHECK-DAG: @[[LINE_1500_TRUNCATION:.*]] = {{.*}}, i32 1500, i32 10 }, {{.*}}, {{.*}}, i8 0 }
+// CHECK-DAG: @[[LINE_1600_TRUNCATION:.*]] = {{.*}}, i32 1600, i32 10 }, {{.*}}, {{.*}}, i8 0 }
+
+// CHECK-LABEL: @convert_unsigned_int_to_unsigned_int
+unsigned int convert_unsigned_int_to_unsigned_int(unsigned int x) {
+  // CHECK: }
+#line 100
+  return x;
+}
+
+// CHECK-LABEL: @convert_unsigned_char_to_unsigned_char
+unsigned char convert_unsigned_char_to_unsigned_char(unsigned char x) {
+  // CHECK: }
+#line 200
+  return x;
+}
+
+// CHECK-LABEL: @convert_signed_int_to_signed_int
+signed int convert_signed_int_to_signed_int(signed int x) {
+  // CHECK: }
+#line 300
+  return x;
+}
+
+// CHECK-LABEL: @convert_signed_char_to_signed_char
+signed char convert_signed_char_to_signed_char(signed char x) {
+  // CHECK: }
+#line 400
+  return x;
+}
+
+// CHECK-LABEL: @convert_unsigned_int_to_unsigned_char
+unsigned char convert_unsigned_int_to_unsigned_char(unsigned int x) {
+  // CHECK: call void @__ubsan_handle_implicit_conversion(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_500_TRUNCATION]] to i8*)
+  // CHECK: }
+#line 500
+  return x;
+}
+
+// CHECK-LABEL: @convert_unsigned_char_to_unsigned_int
+unsigned int convert_unsigned_char_to_unsigned_int(unsigned char x) {
+  // CHECK: }
+#line 600
+  return x;
+}
+
+// CHECK-LABEL: @convert_unsigned_char_to_signed_int
+signed int convert_unsigned_char_to_signed_int(unsigned char x) {
+  // CHECK: }
+#line 700
+  return x;
+}
+
+// CHECK-LABEL: @convert_signed_char_to_signed_int
+signed int convert_signed_char_to_signed_int(signed char x) {
+  // CHECK: }
+#line 800
+  return x;
+}
+
+// CHECK-LABEL: @convert_unsigned_int_to_signed_int
+signed int convert_unsigned_int_to_signed_int(unsigned int x) {
+  // CHECK: }
+#line 900
+  return x;
+}
+
+// CHECK-LABEL: @convert_signed_int_to_unsigned_int
+unsigned int convert_signed_int_to_unsigned_int(signed int x) {
+  // CHECK: }
+#line 1000
+  return x;
+}
+
+// CHECK-LABEL: @convert_signed_int_to_unsigned_char
+unsigned char convert_signed_int_to_unsigned_char(signed int x) {
+  // CHECK: call void @__ubsan_handle_implicit_conversion(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_1100_TRUNCATION]] to i8*)
+  // CHECK: }
+#line 1100
+  return x;
+}
+
+// CHECK-LABEL: @convert_signed_char_to_unsigned_char
+unsigned char convert_signed_char_to_unsigned_char(signed char x) {
+  // CHECK: }
+#line 1200
+  return x;
+}
+
+// CHECK-LABEL: @convert_unsigned_char_to_signed_char
+signed char convert_unsigned_char_to_signed_char(unsigned char x) {
+  // CHECK: }
+#line 1300
+  return x;
+}
+
+// CHECK-LABEL: @convert_signed_char_to_unsigned_int
+unsigned int convert_signed_char_to_unsigned_int(signed char x) {
+  // CHECK: }
+#line 1400
+  return x;
+}
+
+// CHECK-LABEL: @convert_unsigned_int_to_signed_char
+signed char convert_unsigned_int_to_signed_char(unsigned int x) {
+  // CHECK: call void @__ubsan_handle_implicit_conversion(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_1500_TRUNCATION]] to i8*)
+  // CHECK: }
+#line 1500
+  return x;
+}
+
+// CHECK-LABEL: @convert_signed_int_to_signed_char
+signed char convert_signed_int_to_signed_char(signed int x) {
+  // CHECK: call void @__ubsan_handle_implicit_conversion(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_1600_TRUNCATION]] to i8*)
+  // CHECK: }
+#line 1600
+  return x;
+}
diff --git a/test/CodeGen/catch-implicit-integer-truncations-basics.c b/test/CodeGen/catch-implicit-integer-truncations-basics.c
new file mode 100644 (file)
index 0000000..055ddd5
--- /dev/null
@@ -0,0 +1,131 @@
+// RUN: %clang_cc1 -fsanitize=implicit-integer-truncation -fsanitize-recover=implicit-integer-truncation -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s -implicit-check-not="call void @__ubsan_handle_implicit_conversion" --check-prefixes=CHECK
+
+// Test plan:
+//  * Two types - int and char
+//  * Two signs - signed and unsigned
+//  * Square that - we have input and output types.
+// Thus, there are total of (2*2)^2 == 16 tests.
+// These are all the possible variations/combinations of casts.
+// However, not all of them should result in the check.
+// So here, we *only* check which should and which should not result in checks.
+
+// CHECK-DAG: @[[LINE_500_TRUNCATION:.*]] = {{.*}}, i32 500, i32 10 }, {{.*}}, {{.*}}, i8 0 }
+// CHECK-DAG: @[[LINE_1100_TRUNCATION:.*]] = {{.*}}, i32 1100, i32 10 }, {{.*}}, {{.*}}, i8 0 }
+// CHECK-DAG: @[[LINE_1500_TRUNCATION:.*]] = {{.*}}, i32 1500, i32 10 }, {{.*}}, {{.*}}, i8 0 }
+// CHECK-DAG: @[[LINE_1600_TRUNCATION:.*]] = {{.*}}, i32 1600, i32 10 }, {{.*}}, {{.*}}, i8 0 }
+
+// CHECK-LABEL: @convert_unsigned_int_to_unsigned_int
+unsigned int convert_unsigned_int_to_unsigned_int(unsigned int x) {
+  // CHECK: }
+#line 100
+  return x;
+}
+
+// CHECK-LABEL: @convert_unsigned_char_to_unsigned_char
+unsigned char convert_unsigned_char_to_unsigned_char(unsigned char x) {
+  // CHECK: }
+#line 200
+  return x;
+}
+
+// CHECK-LABEL: @convert_signed_int_to_signed_int
+signed int convert_signed_int_to_signed_int(signed int x) {
+  // CHECK: }
+#line 300
+  return x;
+}
+
+// CHECK-LABEL: @convert_signed_char_to_signed_char
+signed char convert_signed_char_to_signed_char(signed char x) {
+  // CHECK: }
+#line 400
+  return x;
+}
+
+// CHECK-LABEL: @convert_unsigned_int_to_unsigned_char
+unsigned char convert_unsigned_int_to_unsigned_char(unsigned int x) {
+  // CHECK: call void @__ubsan_handle_implicit_conversion(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_500_TRUNCATION]] to i8*)
+  // CHECK: }
+#line 500
+  return x;
+}
+
+// CHECK-LABEL: @convert_unsigned_char_to_unsigned_int
+unsigned int convert_unsigned_char_to_unsigned_int(unsigned char x) {
+  // CHECK: }
+#line 600
+  return x;
+}
+
+// CHECK-LABEL: @convert_unsigned_char_to_signed_int
+signed int convert_unsigned_char_to_signed_int(unsigned char x) {
+  // CHECK: }
+#line 700
+  return x;
+}
+
+// CHECK-LABEL: @convert_signed_char_to_signed_int
+signed int convert_signed_char_to_signed_int(signed char x) {
+  // CHECK: }
+#line 800
+  return x;
+}
+
+// CHECK-LABEL: @convert_unsigned_int_to_signed_int
+signed int convert_unsigned_int_to_signed_int(unsigned int x) {
+  // CHECK: }
+#line 900
+  return x;
+}
+
+// CHECK-LABEL: @convert_signed_int_to_unsigned_int
+unsigned int convert_signed_int_to_unsigned_int(signed int x) {
+  // CHECK: }
+#line 1000
+  return x;
+}
+
+// CHECK-LABEL: @convert_signed_int_to_unsigned_char
+unsigned char convert_signed_int_to_unsigned_char(signed int x) {
+  // CHECK: call void @__ubsan_handle_implicit_conversion(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_1100_TRUNCATION]] to i8*)
+  // CHECK: }
+#line 1100
+  return x;
+}
+
+// CHECK-LABEL: @convert_signed_char_to_unsigned_char
+unsigned char convert_signed_char_to_unsigned_char(signed char x) {
+  // CHECK: }
+#line 1200
+  return x;
+}
+
+// CHECK-LABEL: @convert_unsigned_char_to_signed_char
+signed char convert_unsigned_char_to_signed_char(unsigned char x) {
+  // CHECK: }
+#line 1300
+  return x;
+}
+
+// CHECK-LABEL: @convert_signed_char_to_unsigned_int
+unsigned int convert_signed_char_to_unsigned_int(signed char x) {
+  // CHECK: }
+#line 1400
+  return x;
+}
+
+// CHECK-LABEL: @convert_unsigned_int_to_signed_char
+signed char convert_unsigned_int_to_signed_char(unsigned int x) {
+  // CHECK: call void @__ubsan_handle_implicit_conversion(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_1500_TRUNCATION]] to i8*)
+  // CHECK: }
+#line 1500
+  return x;
+}
+
+// CHECK-LABEL: @convert_signed_int_to_signed_char
+signed char convert_signed_int_to_signed_char(signed int x) {
+  // CHECK: call void @__ubsan_handle_implicit_conversion(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_1600_TRUNCATION]] to i8*)
+  // CHECK: }
+#line 1600
+  return x;
+}
index b09f7ddfaedffeb85f0084e5a6e37601fecaaddd..485fba357275dbdf78ce5ae5195ca421f0e0ac43 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s --check-prefix=CHECK
-// RUN: %clang_cc1 -fsanitize=implicit-integer-truncation -fno-sanitize-recover=implicit-integer-truncation -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s --check-prefixes=CHECK,CHECK-SANITIZE,CHECK-SANITIZE-ANYRECOVER,CHECK-SANITIZE-NORECOVER
-// RUN: %clang_cc1 -fsanitize=implicit-integer-truncation -fsanitize-recover=implicit-integer-truncation -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s --check-prefixes=CHECK,CHECK-SANITIZE,CHECK-SANITIZE-ANYRECOVER,CHECK-SANITIZE-RECOVER
-// RUN: %clang_cc1 -fsanitize=implicit-integer-truncation -fsanitize-trap=implicit-integer-truncation -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s --check-prefixes=CHECK,CHECK-SANITIZE,CHECK-SANITIZE-TRAP
+// RUN: %clang_cc1 -fsanitize=implicit-integer-truncation -fno-sanitize-recover=implicit-integer-truncation -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s -implicit-check-not="call void @__ubsan_handle_implicit_conversion" --check-prefixes=CHECK,CHECK-SANITIZE,CHECK-SANITIZE-ANYRECOVER,CHECK-SANITIZE-NORECOVER,CHECK-SANITIZE-UNREACHABLE
+// RUN: %clang_cc1 -fsanitize=implicit-integer-truncation -fsanitize-recover=implicit-integer-truncation -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s -implicit-check-not="call void @__ubsan_handle_implicit_conversion" --check-prefixes=CHECK,CHECK-SANITIZE,CHECK-SANITIZE-ANYRECOVER,CHECK-SANITIZE-RECOVER
+// RUN: %clang_cc1 -fsanitize=implicit-integer-truncation -fsanitize-trap=implicit-integer-truncation -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s -implicit-check-not="call void @__ubsan_handle_implicit_conversion" --check-prefixes=CHECK,CHECK-SANITIZE,CHECK-SANITIZE-TRAP,CHECK-SANITIZE-UNREACHABLE
 
 // CHECK-SANITIZE-ANYRECOVER: @[[UNSIGNED_INT:.*]] = {{.*}} c"'unsigned int'\00" }
 // CHECK-SANITIZE-ANYRECOVER: @[[UNSIGNED_CHAR:.*]] = {{.*}} c"'unsigned char'\00" }
@@ -33,9 +33,10 @@ unsigned char unsigned_int_to_unsigned_char(unsigned int src) {
   // CHECK-SANITIZE-NORECOVER-NEXT: call void @__ubsan_handle_implicit_conversion_abort(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_100]] to i8*), i64 %[[EXTSRC]], i64 %[[EXTDST]]){{.*}}, !nosanitize
   // CHECK-SANITIZE-RECOVER-NEXT: call void @__ubsan_handle_implicit_conversion(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_100]] to i8*), i64 %[[EXTSRC]], i64 %[[EXTDST]]){{.*}}, !nosanitize
   // CHECK-SANITIZE-TRAP-NEXT: call void @llvm.trap(){{.*}}, !nosanitize
-  // CHECK-SANITIZE-TRAP-NEXT: unreachable, !nosanitize
+  // CHECK-SANITIZE-UNREACHABLE-NEXT: unreachable, !nosanitize
   // CHECK-SANITIZE: [[CONT]]:
-  // CHECK: ret i8 %[[DST]]
+  // CHECK-NEXT: ret i8 %[[DST]]
+  // CHECK-NEXT: }
 #line 100
   return src;
 }
@@ -52,9 +53,10 @@ unsigned char signed_int_to_unsigned_char(signed int src) {
   // CHECK-SANITIZE-NORECOVER-NEXT: call void @__ubsan_handle_implicit_conversion_abort(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_200]] to i8*), i64 %[[EXTSRC]], i64 %[[EXTDST]]){{.*}}, !nosanitize
   // CHECK-SANITIZE-RECOVER-NEXT: call void @__ubsan_handle_implicit_conversion(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_200]] to i8*), i64 %[[EXTSRC]], i64 %[[EXTDST]]){{.*}}, !nosanitize
   // CHECK-SANITIZE-TRAP-NEXT: call void @llvm.trap(){{.*}}, !nosanitize
-  // CHECK-SANITIZE-TRAP-NEXT: unreachable, !nosanitize
+  // CHECK-SANITIZE-UNREACHABLE-NEXT: unreachable, !nosanitize
   // CHECK-SANITIZE: [[CONT]]:
-  // CHECK: ret i8 %[[DST]]
+  // CHECK-NEXT: ret i8 %[[DST]]
+  // CHECK-NEXT: }
 #line 200
   return src;
 }
@@ -71,9 +73,10 @@ signed char unsigned_int_to_signed_char(unsigned int src) {
   // CHECK-SANITIZE-NORECOVER-NEXT: call void @__ubsan_handle_implicit_conversion_abort(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_300]] to i8*), i64 %[[EXTSRC]], i64 %[[EXTDST]]){{.*}}, !nosanitize
   // CHECK-SANITIZE-RECOVER-NEXT: call void @__ubsan_handle_implicit_conversion(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_300]] to i8*), i64 %[[EXTSRC]], i64 %[[EXTDST]]){{.*}}, !nosanitize
   // CHECK-SANITIZE-TRAP-NEXT: call void @llvm.trap(){{.*}}, !nosanitize
-  // CHECK-SANITIZE-TRAP-NEXT: unreachable, !nosanitize
+  // CHECK-SANITIZE-UNREACHABLE-NEXT: unreachable, !nosanitize
   // CHECK-SANITIZE: [[CONT]]:
-  // CHECK: ret i8 %[[DST]]
+  // CHECK-NEXT: ret i8 %[[DST]]
+  // CHECK-NEXT: }
 #line 300
   return src;
 }
@@ -90,9 +93,10 @@ signed char signed_int_to_signed_char(signed int src) {
   // CHECK-SANITIZE-NORECOVER-NEXT: call void @__ubsan_handle_implicit_conversion_abort(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_400]] to i8*), i64 %[[EXTSRC]], i64 %[[EXTDST]]){{.*}}, !nosanitize
   // CHECK-SANITIZE-RECOVER-NEXT: call void @__ubsan_handle_implicit_conversion(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_400]] to i8*), i64 %[[EXTSRC]], i64 %[[EXTDST]]){{.*}}, !nosanitize
   // CHECK-SANITIZE-TRAP-NEXT: call void @llvm.trap(){{.*}}, !nosanitize
-  // CHECK-SANITIZE-TRAP-NEXT: unreachable, !nosanitize
+  // CHECK-SANITIZE-UNREACHABLE-NEXT: unreachable, !nosanitize
   // CHECK-SANITIZE: [[CONT]]:
-  // CHECK: ret i8 %[[DST]]
+  // CHECK-NEXT: ret i8 %[[DST]]
+  // CHECK-NEXT: }
 #line 400
   return src;
 }
@@ -116,9 +120,10 @@ uint8_t uint32_to_uint8(uint32_t src) {
   // CHECK-SANITIZE-NORECOVER-NEXT: call void @__ubsan_handle_implicit_conversion_abort(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_500]] to i8*), i64 %[[EXTSRC]], i64 %[[EXTDST]]){{.*}}, !nosanitize
   // CHECK-SANITIZE-RECOVER-NEXT: call void @__ubsan_handle_implicit_conversion(i8* bitcast ({ {{{.*}}}, {{{.*}}}*, {{{.*}}}*, i8 }* @[[LINE_500]] to i8*), i64 %[[EXTSRC]], i64 %[[EXTDST]]){{.*}}, !nosanitize
   // CHECK-SANITIZE-TRAP-NEXT: call void @llvm.trap(){{.*}}, !nosanitize
-  // CHECK-SANITIZE-TRAP-NEXT: unreachable, !nosanitize
+  // CHECK-SANITIZE-UNREACHABLE-NEXT: unreachable, !nosanitize
   // CHECK-SANITIZE: [[CONT]]:
-  // CHECK: ret i8 %[[DST]]
+  // CHECK-NEXT: ret i8 %[[DST]]
+  // CHECK-NEXT: }
 #line 500
   return src;
 }
@@ -134,7 +139,6 @@ uint8_t uint32_to_uint8(uint32_t src) {
 unsigned char explicit_conversion_interference0(unsigned int c) {
   // CHECK-SANITIZE: %[[ANYEXT:.*]] = zext i8 %[[DST:.*]] to i16, !nosanitize
   // CHECK-SANITIZE: call
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return (unsigned short)c;
 }
@@ -144,7 +148,6 @@ unsigned char explicit_conversion_interference0(unsigned int c) {
 unsigned char explicit_conversion_interference1(unsigned int c) {
   // CHECK-SANITIZE: %[[ANYEXT:.*]] = zext i16 %[[DST:.*]] to i32, !nosanitize
   // CHECK-SANITIZE: call
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   unsigned short b;
   return (unsigned char)(b = c);
@@ -166,15 +169,19 @@ __attribute__((no_sanitize("undefined"))) unsigned char blacklist_0(unsigned int
 }
 
 // CHECK-LABEL: @blacklist_1
-__attribute__((no_sanitize("implicit-conversion"))) unsigned char blacklist_1(unsigned int src) {
-  // CHECK-SANITIZE-NOT: call
+__attribute__((no_sanitize("integer"))) unsigned char blacklist_1(unsigned int src) {
   // CHECK: }
   return src;
 }
 
 // CHECK-LABEL: @blacklist_2
-__attribute__((no_sanitize("implicit-integer-truncation"))) unsigned char blacklist_2(unsigned int src) {
-  // CHECK-SANITIZE-NOT: call
+__attribute__((no_sanitize("implicit-conversion"))) unsigned char blacklist_2(unsigned int src) {
+  // CHECK: }
+  return src;
+}
+
+// CHECK-LABEL: @blacklist_3
+__attribute__((no_sanitize("implicit-integer-truncation"))) unsigned char blacklist_3(unsigned int src) {
   // CHECK: }
   return src;
 }
@@ -184,28 +191,24 @@ __attribute__((no_sanitize("implicit-integer-truncation"))) unsigned char blackl
 
 // CHECK-LABEL: @explicit_unsigned_int_to_unsigned_char
 unsigned char explicit_unsigned_int_to_unsigned_char(unsigned int src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return (unsigned char)src;
 }
 
 // CHECK-LABEL: @explicit_signed_int_to_unsigned_char
 unsigned char explicit_signed_int_to_unsigned_char(signed int src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return (unsigned char)src;
 }
 
 // CHECK-LABEL: @explicit_unsigned_int_to_signed_char
 signed char explicit_unsigned_int_to_signed_char(unsigned int src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return (signed char)src;
 }
 
 // CHECK-LABEL: @explicit_signed_int_to_signed_char
 signed char explicit_signed_int_to_signed_char(signed int src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return (signed char)src;
 }
@@ -215,28 +218,24 @@ signed char explicit_signed_int_to_signed_char(signed int src) {
 
 // CHECK-LABEL: @explicit_unsigned_int_to_unsigned_int
 unsigned int explicit_unsigned_int_to_unsigned_int(unsigned int src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return (unsigned int)src;
 }
 
 // CHECK-LABEL: @explicit_signed_int_to_signed_int
 signed int explicit_signed_int_to_signed_int(signed int src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return (signed int)src;
 }
 
 // CHECK-LABEL: @explicit_unsigned_char_to_signed_char
 unsigned char explicit_unsigned_char_to_signed_char(unsigned char src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return (unsigned char)src;
 }
 
 // CHECK-LABEL: @explicit_signed_char_to_signed_char
 signed char explicit_signed_char_to_signed_char(signed char src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return (signed char)src;
 }
@@ -246,28 +245,24 @@ signed char explicit_signed_char_to_signed_char(signed char src) {
 
 // CHECK-LABEL: @unsigned_char_to_unsigned_int
 unsigned int unsigned_char_to_unsigned_int(unsigned char src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return src;
 }
 
 // CHECK-LABEL: @signed_char_to_unsigned_int
 unsigned int signed_char_to_unsigned_int(signed char src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return src;
 }
 
 // CHECK-LABEL: @unsigned_char_to_signed_int
 signed int unsigned_char_to_signed_int(unsigned char src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return src;
 }
 
 // CHECK-LABEL: @signed_char_to_signed_int
 signed int signed_char_to_signed_int(signed char src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return src;
 }
@@ -277,28 +272,24 @@ signed int signed_char_to_signed_int(signed char src) {
 
 // CHECK-LABEL: @explicit_unsigned_char_to_unsigned_int
 unsigned int explicit_unsigned_char_to_unsigned_int(unsigned char src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return (unsigned int)src;
 }
 
 // CHECK-LABEL: @explicit_signed_char_to_unsigned_int
 unsigned int explicit_signed_char_to_unsigned_int(signed char src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return (unsigned int)src;
 }
 
 // CHECK-LABEL: @explicit_unsigned_char_to_signed_int
 signed int explicit_unsigned_char_to_signed_int(unsigned char src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return (signed int)src;
 }
 
 // CHECK-LABEL: @explicit_signed_char_to_signed_int
 signed int explicit_signed_char_to_signed_int(signed char src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return (signed int)src;
 }
@@ -308,28 +299,24 @@ signed int explicit_signed_char_to_signed_int(signed char src) {
 
 // CHECK-LABEL: @unsigned_int_to_bool
 _Bool unsigned_int_to_bool(unsigned int src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return src;
 }
 
 // CHECK-LABEL: @signed_int_to_bool
 _Bool signed_int_to_bool(signed int src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return src;
 }
 
 // CHECK-LABEL: @explicit_unsigned_int_to_bool
 _Bool explicit_unsigned_int_to_bool(unsigned int src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return (_Bool)src;
 }
 
 // CHECK-LABEL: @explicit_signed_int_to_bool
 _Bool explicit_signed_int_to_bool(signed int src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return (_Bool)src;
 }
@@ -341,14 +328,12 @@ _Bool explicit_signed_int_to_bool(signed int src) {
 
 // CHECK-LABEL: @explicit_voidptr_to_unsigned_char
 unsigned char explicit_voidptr_to_unsigned_char(void *src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return (unsigned char)src;
 }
 
 // CHECK-LABEL: @explicit_voidptr_to_signed_char
 signed char explicit_voidptr_to_signed_char(void *src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return (signed char)src;
 }
@@ -358,28 +343,24 @@ signed char explicit_voidptr_to_signed_char(void *src) {
 
 // CHECK-LABEL: @float_to_unsigned_int
 unsigned int float_to_unsigned_int(float src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return src;
 }
 
 // CHECK-LABEL: @float_to_signed_int
 signed int float_to_signed_int(float src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return src;
 }
 
 // CHECK-LABEL: @double_to_unsigned_int
 unsigned int double_to_unsigned_int(double src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return src;
 }
 
 // CHECK-LABEL: @double_to_signed_int
 signed int double_to_signed_int(double src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return src;
 }
@@ -389,7 +370,6 @@ signed int double_to_signed_int(double src) {
 
 // CHECK-LABEL: @double_to_float
 float double_to_float(double src) {
-  // CHECK-SANITIZE-NOT: call
   // CHECK: }
   return src;
 }