__uint128_t is indeed an unsigned integer type. Fixes PR5435.

llvm-svn: 86561
This commit is contained in:
Anders Carlsson 2009-11-09 17:34:18 +00:00
parent d3d9306275
commit 69999d9c23
2 changed files with 4 additions and 1 deletions

View File

@ -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))

View File

@ -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;