1 // General blacklist usage. 2 3 // PR12920 4 // REQUIRES: clang-driver, shell 5 6 // RUN: echo "fun:foo" > %t.good 7 // RUN: echo "badline" > %t.bad 8 9 // RUN: %clang -fsanitize=address -fsanitize-blacklist=%t.good %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-BLACKLIST 10 // CHECK-BLACKLIST: -fsanitize-blacklist 11 12 // Ignore -fsanitize-blacklist flag if there is no -fsanitize flag. 13 // RUN: %clang -fsanitize-blacklist=%t.good %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-SANITIZE 14 // CHECK-NO-SANITIZE-NOT: -fsanitize-blacklist 15 16 // Flag -fno-sanitize-blacklist wins if it is specified later. 17 // RUN: %clang -fsanitize=address -fsanitize-blacklist=%t.good -fno-sanitize-blacklist %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-BLACKLIST 18 // CHECK-NO-BLACKLIST-NOT: -fsanitize-blacklist 19 20 // Driver barks on unexisting blacklist files. 21 // RUN: %clang -fno-sanitize-blacklist -fsanitize-blacklist=unexisting.txt %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-SUCH-FILE 22 // CHECK-NO-SUCH-FILE: error: no such file or directory: 'unexisting.txt' 23 24 // Driver properly reports malformed blacklist files. 25 // RUN: %clang -fsanitize=address -fsanitize-blacklist=%t.bad %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-BAD-BLACKLIST 26 // CHECK-BAD-BLACKLIST: error: malformed sanitizer blacklist 27