1 // Verify ubsan doesn't emit checks for ignorelisted functions and files
2 // RUN: echo "fun:hash" > %t-func.ignorelist
3 // RUN: echo "src:%s" | sed -e 's/\\/\\\\/g' > %t-file.ignorelist
4 // RUN: %clang_cc1 -fsanitize=unsigned-integer-overflow -emit-llvm %s -o - | FileCheck %s --check-prefix=DEFAULT
5 // RUN: %clang_cc1 -fsanitize=unsigned-integer-overflow -fsanitize-ignorelist=%t-func.ignorelist -emit-llvm %s -o - | FileCheck %s --check-prefix=FUNC
6 // RUN: %clang_cc1 -fsanitize=unsigned-integer-overflow -fsanitize-ignorelist=%t-file.ignorelist -emit-llvm %s -o - | FileCheck %s --check-prefix=FILE
14 // DEFAULT: call {{.*}}void @__ubsan
15 // FUNC-NOT: call {{.*}}void @__ubsan
16 // FILE-NOT: call {{.*}}void @__ubsan
24 // DEFAULT: call {{.*}}void @__ubsan
25 // FUNC: call {{.*}}void @__ubsan
26 // FILE-NOT: call {{.*}}void @__ubsan