[cfe-commits] r57927 - /cfe/trunk/lib/Sema/SemaExpr.cpp
Daniel Dunbar
daniel at zuster.org
Tue Oct 21 14:22:34 PDT 2008
Author: ddunbar
Date: Tue Oct 21 16:22:32 2008
New Revision: 57927
URL: http://llvm.org/viewvc/llvm-project?rev=57927&view=rev
Log:
Fix use of dyn_cast.
Modified:
cfe/trunk/lib/Sema/SemaExpr.cpp
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=57927&r1=57926&r2=57927&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Tue Oct 21 16:22:32 2008
@@ -2406,7 +2406,7 @@
// &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
More information about the cfe-commits
mailing list