| 1 |
// RUN: %clang_cc1 -verify=ref,both %s -fms-extensions -fcxx-exceptions |
| 2 |
// RUN: %clang_cc1 -verify=expected,both %s -fexperimental-new-constant-interpreter -fms-extensions -fcxx-exceptions |
| 3 |
|
| 4 |
// ref-no-diagnostics |
| 5 |
// expected-no-diagnostics |
| 6 |
|
| 7 |
/// Used to assert because the two parameters to _rotl do not have the same type. |
| 8 |
static_assert(_rotl(0x01, 5) == 32); |
| 9 |
|
| 10 |
static_assert(alignof(__unaligned int) == 1, ""); |
| 11 |
|
| 12 |
static_assert(__noop() == 0, ""); |
| 13 |
|
| 14 |
constexpr int noopIsActuallyNoop() { |
| 15 |
int a = 0; |
| 16 |
__noop(throw); |
| 17 |
__noop(++a); |
| 18 |
__noop(a = 100); |
| 19 |
return a; |
| 20 |
} |
| 21 |
static_assert(noopIsActuallyNoop() == 0); |