diff options
author | Anders Carlsson <andersca@mac.com> | 2009-11-09 17:34:18 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-11-09 17:34:18 +0000 |
commit | 1c03ca30ae962199ef702324b48550f6af7fdc32 (patch) | |
tree | b90e71b869d45fb45557aa175a435a3f8c0704b9 | |
parent | e48319a8a901bc915d48d02b99c62e5f2589dbd9 (diff) |
__uint128_t is indeed an unsigned integer type. Fixes PR5435.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86561 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AST/Type.cpp | 2 | ||||
-rw-r--r-- | test/Sema/128bitint.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index e9ce830574..ae78b89e4b 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -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)) diff --git a/test/Sema/128bitint.c b/test/Sema/128bitint.c index 2a18d904f8..b97238d05d 100644 --- a/test/Sema/128bitint.c +++ b/test/Sema/128bitint.c @@ -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; |