From: Daniel Dunbar Date: Tue, 21 Oct 2008 21:22:32 +0000 (+0000) Subject: Fix use of dyn_cast. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=48d04ae529b023abe5ed825f52a9b96ce01d1496;p=clang Fix use of dyn_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57927 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 8c63060b61..7a3c6bdeb1 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -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(E)->getBase()); - ValueDecl *VD = dyn_cast(D); + ValueDecl *VD = dyn_cast_or_null(D); if (!VD || VD->getType()->isPointerType()) return 0; else