[cfe-commits] r115569 - /cfe/trunk/lib/CodeGen/CGExprScalar.cpp
Devang Patel
dpatel at apple.com
Mon Oct 4 15:28:24 PDT 2010
Author: dpatel
Date: Mon Oct 4 17:28:23 2010
New Revision: 115569
URL: http://llvm.org/viewvc/llvm-project?rev=115569&view=rev
Log:
dyn_cast is more appropriate here.
Modified:
cfe/trunk/lib/CodeGen/CGExprScalar.cpp
Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=115569&r1=115568&r2=115569&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Mon Oct 4 17:28:23 2010
@@ -730,7 +730,7 @@
if (DI && CGF.CGM.getCodeGenOpts().LimitDebugInfo) {
QualType PQTy = E->getBase()->IgnoreParenImpCasts()->getType();
if (const PointerType * PTy = dyn_cast<PointerType>(PQTy))
- if (FieldDecl *M = cast<FieldDecl>(E->getMemberDecl()))
+ if (FieldDecl *M = dyn_cast<FieldDecl>(E->getMemberDecl()))
DI->getOrCreateRecordType(PTy->getPointeeType(),
M->getParent()->getLocation());
}
More information about the cfe-commits
mailing list