diff options
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 63afa79f2a..902afac0a7 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -2497,6 +2497,8 @@ ExprResult Sema::ActOnNumericConstant(const Token &Tok) { // Does it fit in a unsigned long long? if (ResultVal.isIntN(LongLongSize)) { // Does it fit in a signed long long? + // To be compatible with MSVC, hex integer literals ending with the + // LL or i64 suffix are always signed in Microsoft mode. if (!Literal.isUnsigned && (ResultVal[LongLongSize-1] == 0 || (getLangOptions().Microsoft && Literal.isLongLong))) Ty = Context.LongLongTy; |