Debian Codegraph @

clang/test/CodeGenObjCXX/address-safety-attr.mm

raw
1 // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s --implicit-check-not=sanitize_address
2 // RUN: %clang_cc1 -emit-llvm -o - %s -fsanitize=address | FileCheck %s --check-prefixes=CHECK,ASAN
3
4 @interface MyClass
5 + (int) addressSafety:(int*)a;
6 @end
7
8 @implementation MyClass
9
10 // ASAN: ; Function Attrs:
11 // ASAN-SAME: sanitize_address
12 // CHECK-LABEL: define {{.*}}+[MyClass load]
13 +(void) load { }
14
15 // ASAN: ; Function Attrs:
16 // ASAN-SAME: sanitize_address
17 // CHECK-LABEL: define {{.*}}+[MyClass addressSafety:]
18 + (int) addressSafety:(int*)a { return *a; }
19
20 @end