[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Sema / integer-overflow.cpp
blobbe9397e3d170e9b51ee49b8e7a7bc4f9da163a65
1 // RUN: %clang_cc1 %s -Wno-unused-value -verify -fsyntax-only
3 namespace GH58944 {
4 struct A {
5 A(unsigned long) ;
6 };
8 A a(1024 * 1024 * 1024 * 1024 * 1024ull); // expected-warning {{overflow in expression; result is 0 with type 'int'}}
10 void f() {
11 new int[1024 * 1024 * 1024 * 1024 * 1024ull]; // expected-warning {{overflow in expression; result is 0 with type 'int'}}
13 int arr[]{1,2,3};
14 arr[1024 * 1024 * 1024 * 1024 * 1024ull]; // expected-warning {{overflow in expression; result is 0 with type 'int'}}
16 (int){1024 * 1024 * 1024 * 1024 * 1024}; // expected-warning {{overflow in expression; result is 0 with type 'int'}}