From: Devang Patel Date: Mon, 4 Oct 2010 22:28:23 +0000 (+0000) Subject: dyn_cast is more appropriate here. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=49c8465f14fc3b2e1a32c7016ad3fb4e2cf8d466;p=clang dyn_cast is more appropriate here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115569 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index c7176cc2ab..62433a1781 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -730,7 +730,7 @@ Value *ScalarExprEmitter::VisitMemberExpr(MemberExpr *E) { if (DI && CGF.CGM.getCodeGenOpts().LimitDebugInfo) { QualType PQTy = E->getBase()->IgnoreParenImpCasts()->getType(); if (const PointerType * PTy = dyn_cast(PQTy)) - if (FieldDecl *M = cast(E->getMemberDecl())) + if (FieldDecl *M = dyn_cast(E->getMemberDecl())) DI->getOrCreateRecordType(PTy->getPointeeType(), M->getParent()->getLocation()); }