]> granicus.if.org Git - clang/commitdiff
Add a comment for r123231.
authorFrancois Pichet <pichet2000@gmail.com>
Tue, 11 Jan 2011 23:38:13 +0000 (23:38 +0000)
committerFrancois Pichet <pichet2000@gmail.com>
Tue, 11 Jan 2011 23:38:13 +0000 (23:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123291 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExpr.cpp

index 63afa79f2ae548576cd02d51071a8e76e8d2787c..902afac0a7a80c324b08058578b5ee9563c093d1 100644 (file)
@@ -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;