mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-13 19:24:21 +00:00
Fix use of dyn_cast.
llvm-svn: 57927
This commit is contained in:
parent
28929589e7
commit
445693afaf
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user