// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t 10 0 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefixes=CHECK,T0
+// RUN: not %run %t 10 0 2>&1 | FileCheck %s --check-prefixes=CHECK,T0
// RUN: not %run %t 10000000 0 2>&1 | FileCheck %s --check-prefixes=CHECK,T0
-// RUN: not %run %t 10 1 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefixes=CHECK,T1
+// RUN: not %run %t 10 1 2>&1 | FileCheck %s --check-prefixes=CHECK,T1
// RUN: not %run %t 10000000 1 2>&1 | FileCheck %s --check-prefixes=CHECK,T1
// REQUIRES: stable-runtime
// RUN: %clangxx_msan -DERROR -DMSANCB_SET -DMSANCB_CLEAR %s -o %t && not %run %t 2>&1 | \
// RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOCB
// RUN: %clangxx_msan -DMSANCB_SET %s -o %t && %run %t 2>&1 | \
-// RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOCB
+// RUN: FileCheck %s --check-prefixes=SUCCEED,CHECK-NOCB
#include <sanitizer/msan_interface.h>
#include <stdio.h>
#endif
// CHECK-CB: msan-death-callback
// CHECK-NOCB-NOT: msan-death-callback
+
+ // CHECK-NOT: done
+ // SUCCEED: done
fprintf(stderr, "done\n");
return 0;
}
// RUN: %clang -fsanitize=pointer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-C --implicit-check-not="pointer-overflow"
-// RUN: %clangxx -fsanitize=pointer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-CPP --implicit-check-not="pointer-overflow"
+// RUN: %clangxx -x c++ -fsanitize=pointer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-CPP --implicit-check-not="pointer-overflow"
#include <stdlib.h>
base = (char *)0;
result = base + 0;
// CHECK-C: pointer-overflow
+ // CHECK-CPP-NOT: pointer-overflow
base = (char *)0;
result = base + 1;