1f3b9c895SAlexey Samsonov // RUN: %clangxx -fsanitize=integer %s -o %t 2b32a22eaSSumanth Gundapaneni // RUN: %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOTYPE 3150def97SFilipe Cabecinhas // RUN: %env_ubsan_opts=report_error_type=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TYPE 4760750c4SAlexey Samsonov // REQUIRES: ubsan-asan 5760750c4SAlexey Samsonov 6760750c4SAlexey Samsonov #include <stdint.h> 7760750c4SAlexey Samsonov main()8760750c4SAlexey Samsonovint main() { 9760750c4SAlexey Samsonov (void)(uint64_t(10000000000000000000ull) + uint64_t(9000000000000000000ull)); 10*2b1eae0aSVedant Kumar // CHECK-NOTYPE: SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior {{.*}}summary.cpp:[[@LINE-1]]:44 11*2b1eae0aSVedant Kumar // CHECK-TYPE: SUMMARY: UndefinedBehaviorSanitizer: unsigned-integer-overflow {{.*}}summary.cpp:[[@LINE-2]]:44 12760750c4SAlexey Samsonov return 0; 13760750c4SAlexey Samsonov } 14