1 // RUN: %clang -x c -fsanitize=pointer-overflow %s -o %t
2 // RUN: %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK-NOTYPE
3 // RUN: %env_ubsan_opts=report_error_type=1 %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK-TYPE
5 // RUN: %clangxx -fsanitize=pointer-overflow %s -o %t
6 // RUN: %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK-NOTYPE
7 // RUN: %env_ubsan_opts=report_error_type=1 %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK-TYPE
11 int main(int argc
, char *argv
[]) {
16 // CHECK-NOTYPE-NOT: SUMMARY:
17 // CHECK-TYPE-NOT: SUMMARY:
21 // CHECK-NOTYPE: SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior {{.*}}summary.cpp:[[@LINE-1]]:17
22 // CHECK-TYPE: SUMMARY: UndefinedBehaviorSanitizer: nullptr-with-nonzero-offset {{.*}}summary.cpp:[[@LINE-2]]:17
26 // CHECK-NOTYPE: SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior {{.*}}summary.cpp:[[@LINE-1]]:17
27 // CHECK-TYPE: SUMMARY: UndefinedBehaviorSanitizer: nullptr-after-nonzero-offset {{.*}}summary.cpp:[[@LINE-2]]:17