Skip to content

Commit db0a3bd

Browse files
committed
fixup! draft unittest not ready
1 parent 119a156 commit db0a3bd

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

clang/lib/Sema/SemaDeclCXX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17578,7 +17578,7 @@ static bool ConvertAPValueToString(const APValue &V, QualType T,
1757817578
}
1757917579

1758017580
llvm::APSInt vInt = V.getInt();
17581-
if (vInt > std::numeric_limits<uint64_t>::max() ||
17581+
if (vInt > std::numeric_limits<int64_t>::max() ||
1758217582
vInt < std::numeric_limits<int64_t>::min()) {
1758317583
vInt.toString(Str,16);
1758417584
} else {

clang/test/CXX/dcl.decl/dcl.decl.general/p4-20.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ struct S {
3535
void member() requires(sizeof(T) > 1);
3636
};
3737

38-
namespace GH71675 {
39-
constexpr unsigned _BitInt(__BITINT_MAXWIDTH__ >> 6) F = ~0;
40-
static_assert(F == 1); // no-error
41-
}
42-
4338
template<typename T>
4439
void ContainingFunction() {
4540
// expected-error@+1 {{non-templated function cannot have a requires clause}}

clang/test/SemaCXX/static-assert.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ int f() {
255255
}
256256
}
257257

258+
namespace GH71675 {
259+
constexpr unsigned _BitInt(__BITINT_MAXWIDTH__ >> 6) F = ~0;
260+
static_assert(F == 1); // expected-error {{static assertion failed due to requirement 'F == 1'}}
261+
// expected-note {{expression evaluates to 'F'}}
262+
}
263+
258264
namespace Diagnostics {
259265
/// No notes for literals.
260266
static_assert(false, ""); // expected-error {{failed}}

0 commit comments

Comments
 (0)