]> granicus.if.org Git - clang/commitdiff
kill a FIXME in IsIntegralPromotion
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 22 Jul 2011 21:09:04 +0000 (21:09 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 22 Jul 2011 21:09:04 +0000 (21:09 +0000)
IsIntegralPromotion should consider the signedness of FromType when
calculating promotions. This, as of now, cannot be exercised on any
platform so there is no corresponding test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135803 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaOverload.cpp

index 969998eaa019b283a9eaaecefff28e97cef4507f..793e427629cf56084b71c4ce62dc9eaebbd26262 100644 (file)
@@ -1392,12 +1392,9 @@ bool Sema::IsIntegralPromotion(Expr *From, QualType FromType, QualType ToType) {
       ToType->isIntegerType()) {
     // Determine whether the type we're converting from is signed or
     // unsigned.
-    bool FromIsSigned;
+    bool FromIsSigned = FromType->isSignedIntegerType();
     uint64_t FromSize = Context.getTypeSize(FromType);
 
-    // FIXME: Is wchar_t signed or unsigned? We assume it's signed for now.
-    FromIsSigned = true;
-
     // The types we'll try to promote to, in the appropriate
     // order. Try each of these types.
     QualType PromoteTypes[6] = {