Testcase:
int a();
int b() {
a("asdf");
}

Run clang -ast-dump to see the issue.

Patch attached.

-Eli
Index: Sema/SemaExpr.cpp
===================================================================
--- Sema/SemaExpr.cpp   (revision 46471)
+++ Sema/SemaExpr.cpp   (working copy)
@@ -872,10 +888,10 @@
   QualType Ty = Expr->getType();
   assert(!Ty.isNull() && "DefaultArgumentPromotion - missing type");
 
-  if (Ty->isPromotableIntegerType()) // C99 6.3.1.1p2
-    ImpCastExprToType(Expr, Context.IntTy);
   if (Ty == Context.FloatTy)
     ImpCastExprToType(Expr, Context.DoubleTy);
+
+  UsualUnaryConversions(Expr);
 }
 
 /// DefaultFunctionArrayConversion (C99 6.3.2.1p3, C99 6.3.2.1p4).
_______________________________________________
cfe-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

Reply via email to