Skip to content

Commit c77b2ad

Browse files
committed
[clang][Interp] Disable int128 tests on targets that don't have int128
This broke build bots.
1 parent 632022e commit c77b2ad

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clang/test/AST/Interp/literals.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
#define INT_MAX __INT_MAX__
88

99
typedef __INTPTR_TYPE__ intptr_t;
10-
typedef __int128 int128_t;
11-
typedef unsigned __int128 uint128_t;
1210

1311

1412
static_assert(true, "");
@@ -29,7 +27,10 @@ static_assert(number != 10, ""); // expected-error{{failed}} \
2927
// ref-note{{evaluates to}}
3028

3129

30+
#ifdef __SIZEOF__INT128__
3231
namespace i128 {
32+
typedef __int128 int128_t;
33+
typedef unsigned __int128 uint128_t;
3334
constexpr int128_t I128_1 = 12;
3435
static_assert(I128_1 == 12, "");
3536
static_assert(I128_1 != 10, "");
@@ -87,6 +88,7 @@ constexpr int128_t Error = __LDBL_MAX__; // ref-warning {{implicit conversion of
8788
// expected-error {{must be initialized by a constant expression}} \
8889
// expected-note {{is outside the range of representable values of type}}
8990
}
91+
#endif
9092

9193
constexpr bool b = number;
9294
static_assert(b, "");

0 commit comments

Comments
 (0)