__uint128_t is indeed an unsigned integer type. Fixes PR5435.
llvm-svn: 86561
This commit is contained in:
parent
d3d9306275
commit
69999d9c23
|
@ -425,7 +425,7 @@ bool Type::isSignedIntegerType() const {
|
|||
bool Type::isUnsignedIntegerType() const {
|
||||
if (const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType)) {
|
||||
return BT->getKind() >= BuiltinType::Bool &&
|
||||
BT->getKind() <= BuiltinType::ULongLong;
|
||||
BT->getKind() <= BuiltinType::UInt128;
|
||||
}
|
||||
|
||||
if (const EnumType *ET = dyn_cast<EnumType>(CanonicalType))
|
||||
|
|
|
@ -4,3 +4,6 @@ typedef unsigned u128 __attribute__((__mode__(TI)));
|
|||
|
||||
int a[((i128)-1 ^ (i128)-2) == 1 ? 1 : -1];
|
||||
int a[(u128)-1 > 1LL ? 1 : -1];
|
||||
|
||||
// PR5435
|
||||
__uint128_t b = (__uint128_t)-1;
|
||||
|
|
Loading…
Reference in New Issue