From: Bill Wendling Date: Tue, 17 Jul 2007 05:09:22 +0000 (+0000) Subject: Use the correct method for getting the ReferenceType from a QualType. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ccb4af858be0d03c0a07fd222b837de2687b68dc;p=clang Use the correct method for getting the ReferenceType from a QualType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39960 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp index 952c83fcf1..6439e48e9d 100644 --- a/Sema/SemaExpr.cpp +++ b/Sema/SemaExpr.cpp @@ -597,7 +597,7 @@ void Sema::DefaultFunctionArrayConversion(Expr *&e) { QualType t = e->getType(); assert(!t.isNull() && "DefaultFunctionArrayConversion - missing type"); - if (const ReferenceType *ref = dyn_cast(t)) { + if (const ReferenceType *ref = t->isReferenceType()) { promoteExprToType(e, ref->getReferenceeType()); // C++ [expr] t = e->getType(); } @@ -616,7 +616,7 @@ void Sema::UsualUnaryConversions(Expr *&expr) { QualType t = expr->getType(); assert(!t.isNull() && "UsualUnaryConversions - missing type"); - if (const ReferenceType *ref = dyn_cast(t)) { + if (const ReferenceType *ref = t->isReferenceType()) { promoteExprToType(expr, ref->getReferenceeType()); // C++ [expr] t = expr->getType(); }