summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 9c36c17e493..9d75f4fdb58 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -927,7 +927,7 @@ void Sema::DefaultFunctionArrayConversion(Expr *&E) {
assert(!Ty.isNull() && "DefaultFunctionArrayConversion - missing type");
if (const ReferenceType *ref = Ty->getAsReferenceType()) {
- ImpCastExprToType(E, ref->getReferenceeType()); // C++ [expr]
+ ImpCastExprToType(E, ref->getPointeeType()); // C++ [expr]
Ty = E->getType();
}
if (Ty->isFunctionType())
@@ -946,7 +946,7 @@ Expr *Sema::UsualUnaryConversions(Expr *&Expr) {
assert(!Ty.isNull() && "UsualUnaryConversions - missing type");
if (const ReferenceType *Ref = Ty->getAsReferenceType()) {
- ImpCastExprToType(Expr, Ref->getReferenceeType()); // C++ [expr]
+ ImpCastExprToType(Expr, Ref->getPointeeType()); // C++ [expr]
Ty = Expr->getType();
}
if (Ty->isPromotableIntegerType()) // C99 6.3.1.1p2
OpenPOWER on IntegriCloud