]> granicus.if.org Git - clang/commitdiff
Use the correct method for getting the ReferenceType from a QualType.
authorBill Wendling <isanbard@gmail.com>
Tue, 17 Jul 2007 05:09:22 +0000 (05:09 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 17 Jul 2007 05:09:22 +0000 (05:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39960 91177308-0d34-0410-b5e6-96231b3b80d8

Sema/SemaExpr.cpp

index 952c83fcf138a474541ede39e5a25829f482b680..6439e48e9d58fe2c30b0a65f65efe18f87730a04 100644 (file)
@@ -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<ReferenceType>(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<ReferenceType>(t)) {
+  if (const ReferenceType *ref = t->isReferenceType()) {
     promoteExprToType(expr, ref->getReferenceeType()); // C++ [expr]
     t = expr->getType();
   }