[clang] c77b2ad - [clang][Interp] Disable int128 tests on targets that don't have int128
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 1 10:19:27 PDT 2023
Author: Timm Bäder
Date: 2023-10-01T19:18:48+02:00
New Revision: c77b2ad00ba465698783e3a4a9b7af07c337171c
URL: https://github.com/llvm/llvm-project/commit/c77b2ad00ba465698783e3a4a9b7af07c337171c
DIFF: https://github.com/llvm/llvm-project/commit/c77b2ad00ba465698783e3a4a9b7af07c337171c.diff
LOG: [clang][Interp] Disable int128 tests on targets that don't have int128
This broke build bots.
Added:
Modified:
clang/test/AST/Interp/literals.cpp
Removed:
################################################################################
diff --git a/clang/test/AST/Interp/literals.cpp b/clang/test/AST/Interp/literals.cpp
index 0dd036353fa7efd..b57a0e64c5fac32 100644
--- a/clang/test/AST/Interp/literals.cpp
+++ b/clang/test/AST/Interp/literals.cpp
@@ -7,8 +7,6 @@
#define INT_MAX __INT_MAX__
typedef __INTPTR_TYPE__ intptr_t;
-typedef __int128 int128_t;
-typedef unsigned __int128 uint128_t;
static_assert(true, "");
@@ -29,7 +27,10 @@ static_assert(number != 10, ""); // expected-error{{failed}} \
// ref-note{{evaluates to}}
+#ifdef __SIZEOF__INT128__
namespace i128 {
+ typedef __int128 int128_t;
+ typedef unsigned __int128 uint128_t;
constexpr int128_t I128_1 = 12;
static_assert(I128_1 == 12, "");
static_assert(I128_1 != 10, "");
@@ -87,6 +88,7 @@ constexpr int128_t Error = __LDBL_MAX__; // ref-warning {{implicit conversion of
// expected-error {{must be initialized by a constant expression}} \
// expected-note {{is outside the range of representable values of type}}
}
+#endif
constexpr bool b = number;
static_assert(b, "");
More information about the cfe-commits
mailing list