forked from OSchip/llvm-project
ui64, etc. are valid VS suffixes.
Fixes radar 7562363. llvm-svn: 94224
This commit is contained in:
parent
10b2046750
commit
8c6c0b6a1f
|
@ -375,7 +375,7 @@ NumericLiteralParser(const char *begin, const char *end,
|
|||
continue; // Success.
|
||||
case 'i':
|
||||
if (PP.getLangOptions().Microsoft) {
|
||||
if (isFPConstant || isUnsigned || isLong || isLongLong) break;
|
||||
if (isFPConstant || isLong || isLongLong) break;
|
||||
|
||||
// Allow i8, i16, i32, i64, and i128.
|
||||
if (s + 1 != ThisTokEnd) {
|
||||
|
|
|
@ -7,6 +7,19 @@ __int64 x5 = 0x42i64;
|
|||
__int64 x4 = 70000000i128;
|
||||
|
||||
__int64 y = 0x42i64u; // expected-error {{invalid suffix}}
|
||||
__int64 w = 0x43ui64; // expected-error {{invalid suffix}}
|
||||
__int64 w = 0x43ui64;
|
||||
__int64 z = 9Li64; // expected-error {{invalid suffix}}
|
||||
__int64 q = 10lli64; // expected-error {{invalid suffix}}
|
||||
|
||||
// radar 7562363
|
||||
#define ULLONG_MAX 0xffffffffffffffffui64
|
||||
#define UINT 0xffffffffui32
|
||||
#define USHORT 0xffffui8
|
||||
#define UCHAR 0xffffffffui8
|
||||
|
||||
void a() {
|
||||
unsigned long long m = ULLONG_MAX;
|
||||
unsigned int n = UINT;
|
||||
unsigned short s = USHORT;
|
||||
unsigned char c = UCHAR;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue