From: Francois Pichet Date: Tue, 11 Jan 2011 23:38:13 +0000 (+0000) Subject: Add a comment for r123231. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2432320a996adcfcc5671dd0f309579a2ef2e465;p=clang Add a comment for r123231. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123291 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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;