Don't perform integer promotions on the operand to a cast; this
simplifies the AST, and can matter in some rare cases involving
casts to vector types. Patch by Enea Zaffanella.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79126 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index ced300b..1a519ff 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -2992,7 +2992,7 @@
if (getLangOptions().CPlusPlus)
return CXXCheckCStyleCast(TyR, castType, castExpr, Kind, FunctionalStyle);
- UsualUnaryConversions(castExpr);
+ DefaultFunctionArrayConversion(castExpr);
// C99 6.5.4p2: the cast type needs to be void or scalar and the expression
// type needs to be scalar.