llvm-capstone/clang/test/CodeGen/catch-nullptr-and-nonzero-offset-ignorelist.c
Zarko Todorovski 8924ba3bf8 [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
2021-11-17 09:43:02 -05:00

35 lines
1.6 KiB
C

// RUN: %clang_cc1 -x c -fsanitize=pointer-overflow -fsanitize-recover=pointer-overflow -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s -implicit-check-not="call void @__ubsan_handle_pointer_overflow"
// RUN: %clang_cc1 -x c -fno-delete-null-pointer-checks -fsanitize=pointer-overflow -fsanitize-recover=pointer-overflow -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s -implicit-check-not="call void @__ubsan_handle_pointer_overflow"
// RUN: %clang_cc1 -x c++ -fsanitize=pointer-overflow -fsanitize-recover=pointer-overflow -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s -implicit-check-not="call void @__ubsan_handle_pointer_overflow"
// RUN: %clang_cc1 -x c++ -fno-delete-null-pointer-checks -fsanitize=pointer-overflow -fsanitize-recover=pointer-overflow -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s -implicit-check-not="call void @__ubsan_handle_pointer_overflow"
#ifdef __cplusplus
extern "C" {
#endif
// CHECK-LABEL: @baseline
char *baseline(char *base, unsigned long offset) {
// CHECK: call void @__ubsan_handle_pointer_overflow(
return base + offset;
}
// CHECK-LABEL: @ignorelist_0
__attribute__((no_sanitize("undefined"))) char *ignorelist_0(char *base, unsigned long offset) {
return base + offset;
}
// CHECK-LABEL: @ignorelist_1
__attribute__((no_sanitize("pointer-overflow"))) char *ignorelist_1(char *base, unsigned long offset) {
return base + offset;
}
// CHECK-LABEL: @ignore_non_default_address_space
__attribute__((address_space(1))) char *ignore_non_default_address_space(__attribute__((address_space(1))) char *base, unsigned long offset) {
return base + offset;
}
#ifdef __cplusplus
}
#endif