aboutsummaryrefslogtreecommitdiff
path: root/clang/test/AST/ByteCode/ms.cpp
blob: 35ffcbccae3b3abbce776d1aa1122d2a692dce30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// RUN: %clang_cc1 -verify=ref,both %s -fms-extensions -fcxx-exceptions
// RUN: %clang_cc1 -verify=expected,both %s -fexperimental-new-constant-interpreter -fms-extensions -fcxx-exceptions

// ref-no-diagnostics
// expected-no-diagnostics

/// Used to assert because the two parameters to _rotl do not have the same type.
static_assert(_rotl(0x01, 5) == 32);

static_assert(alignof(__unaligned int) == 1, "");

static_assert(__noop() == 0, "");

constexpr int noopIsActuallyNoop() {
    int a = 0;
    __noop(throw);
    __noop(++a);
    __noop(a = 100);
    return a;
}
static_assert(noopIsActuallyNoop() == 0);