Fix use of dyn_cast.

llvm-svn: 57927
This commit is contained in:
Daniel Dunbar 2008-10-21 21:22:32 +00:00
parent 28929589e7
commit 445693afaf

View File

@ -2406,7 +2406,7 @@ static NamedDecl *getPrimaryDecl(Expr *E) {
// &X[4] and &4[X] refers to X if X is not a pointer.
NamedDecl *D = getPrimaryDecl(cast<ArraySubscriptExpr>(E)->getBase());
ValueDecl *VD = dyn_cast<ValueDecl>(D);
ValueDecl *VD = dyn_cast_or_null<ValueDecl>(D);
if (!VD || VD->getType()->isPointerType())
return 0;
else