38 lines · plain
1// RUN: rm -rf %t2// RUN: split-file %s %t3 4// RUN: %clang -target x86_64-unknown-linux-gnu -S -emit-llvm -fsanitize=address %t/test.c -o - | FileCheck %s --check-prefixes=SANITIZE5 6// RUN: %clang -target x86_64-unknown-linux-gnu -S -emit-llvm -fsanitize=address -fsanitize-ignorelist=%t/order-0.ignorelist %t/test.c -o - | FileCheck %s --check-prefixes=IGNORE7// RUN: %clang -target x86_64-unknown-linux-gnu -S -emit-llvm -fsanitize=address -fsanitize-ignorelist=%t/order-1.ignorelist %t/test.c -o - | FileCheck %s --check-prefixes=SANITIZE8// RUN: %clang -target x86_64-unknown-linux-gnu -S -emit-llvm -fsanitize=address -fsanitize-ignorelist=%t/order-2.ignorelist %t/test.c -o - | FileCheck %s --check-prefixes=IGNORE9// RUN: %clang -target x86_64-unknown-linux-gnu -S -emit-llvm -fsanitize=address -fsanitize-ignorelist=%t/order-3.ignorelist %t/test.c -o - | FileCheck %s --check-prefixes=SANITIZE10 11// The same type can appear multiple times within an ignorelist. Any ``=sanitize`` type12// entries enable sanitizer instrumentation, even if it was ignored by entries before.13// If multiple entries match the source, then the latest entry takes the14// precedence.15 16//--- order-0.ignorelist17global:global_array18 19//--- order-1.ignorelist20global:global_array21global:global_array=sanitize22 23//--- order-2.ignorelist24global:*25global:global_array=sanitize26global:global_array27 28//--- order-3.ignorelist29global:*30global:global_array=sanitize31global:global*32global:*array=sanitize33 34//--- test.c35// SANITIZE: @global_array ={{.*}} global {{.*}}, comdat, align {{.*}} 36// IGNORE: @global_array ={{.*}} global {{.*}}, no_sanitize_address, align {{.*}}37unsigned global_array[100] = {-1};38