From 2432320a996adcfcc5671dd0f309579a2ef2e465 Mon Sep 17 00:00:00 2001 From: Francois Pichet Date: Tue, 11 Jan 2011 23:38:13 +0000 Subject: [PATCH] Add a comment for r123231. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123291 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaExpr.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.40.0