aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Sema/SemaExpr.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp
index 615b243334..a32e607aa4 100644
--- a/Sema/SemaExpr.cpp
+++ b/Sema/SemaExpr.cpp
@@ -657,6 +657,8 @@ ParseCastExpr(SourceLocation LParenLoc, TypeTy *Ty,
Expr *castExpr = static_cast<Expr*>(Op);
QualType castType = QualType::getFromOpaquePtr(Ty);
+ UsualUnaryConversions(castExpr);
+
// C99 6.5.4p2: the cast type needs to be void or scalar and the expression
// type needs to be scalar.
if (!castType->isScalarType() && !castType->isVoidType()) {