1 // RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify=expected,both %s
2 // RUN: %clang_cc1 -verify=ref,both %s
5 static_assert(__builtin_constant_p(12), "");
6 static_assert(__builtin_constant_p(1.0), "");
9 static_assert(__builtin_constant_p(I
), "");
10 static_assert(__builtin_constant_p(I
+ 10), "");
11 static_assert(__builtin_constant_p(I
+ 10.0), "");
12 static_assert(__builtin_constant_p(nullptr), "");
13 static_assert(__builtin_constant_p(&I
), ""); // both-error {{failed due to requirement}}
14 static_assert(__builtin_constant_p((void)I
), ""); // both-error {{failed due to requirement}}