From 445693afaf6c4e514c1949121867af14e451eccf Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 21 Oct 2008 21:22:32 +0000 Subject: [PATCH] Fix use of dyn_cast. llvm-svn: 57927 --- clang/lib/Sema/SemaExpr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 8c63060b6150..7a3c6bdeb157 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/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