// RUN: %clangxx -fsanitize=integer -fsanitize-recover=integer %s -o %t
// RUN: not %t 2>&1 | FileCheck %s

// __ubsan_default_options() doesn't work on Darwin.
// XFAIL: darwin

#include <stdint.h>

extern "C" const char *__ubsan_default_options() {
  return "halt_on_error=1";
}

int main() {
  (void)(uint64_t(10000000000000000000ull) + uint64_t(9000000000000000000ull));
  // CHECK: ubsan_options.cc:[[@LINE-1]]:44: runtime error: unsigned integer overflow
  return 0;
}


Add a testcase for __ubsan_default_options() function.
[UBSan] Add a testcase for __ubsan_default_options() function.

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@236151 91177308-0d34-0410-b5e6-96231b3b80d8
