File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
compiler-rt/test/ubsan_minimal/TestCases Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 11// RUN: %clang_min_runtime -fsanitize=alignment %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK
22
3- void f (int & n) {}
3+ void f (int & n) {}
44
5- int * t;
5+ int * t;
66
77int main () {
8- int r;
9- t = (int *)(((char *)&r) + 1 );
10- // CHECK: ubsan: type-mismatch by 0x{{[[:xdigit:]]+}} address 0x{{[[:xdigit:]]+$}}
11- // CHECK-NOT: type-mismatch
8+ int r;
9+ t = (int *)(((char *)&r) + 1 );
10+ // CHECK: ubsan: type-mismatch by 0x{{[[:xdigit:]]+}} address 0x{{[[:xdigit:]]+$}}
11+ // CHECK-NOT: type-mismatch
1212
13- f (*t);
13+ f (*t);
1414}
Original file line number Diff line number Diff line change 11// RUN: %clang_min_runtime -fsanitize=null %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK
22
3- void f (int & n) {}
3+ void f (int & n) {}
44
5- int * t;
5+ int * t;
66
77int main () {
8- // CHECK: ubsan: type-mismatch by 0x{{[[:xdigit:]]+}} address 0x{{[[:xdigit:]]+$}}
9- // CHECK-NOT: type-mismatch
10- f (*t);
8+ // CHECK: ubsan: type-mismatch by 0x{{[[:xdigit:]]+}} address 0x{{[[:xdigit:]]+$}}
9+ // CHECK-NOT: type-mismatch
10+ f (*t);
1111}
You can’t perform that action at this time.
0 commit comments