]> granicus.if.org Git - clang/commitdiff
use isa<>
authorChris Lattner <sabre@nondot.org>
Mon, 23 Mar 2009 17:57:53 +0000 (17:57 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 23 Mar 2009 17:57:53 +0000 (17:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67543 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Expr.cpp

index 789fbc5ce1d3e82a4ed8ceee0f52a3a98e960edb..92310902e284abf52ed615e9cf10030bf065bfdf 100644 (file)
@@ -786,7 +786,7 @@ Expr::isModifiableLvalueResult Expr::isModifiableLvalue(ASTContext &Ctx) const {
   //   void takeclosure(void (^C)(void));
   //   void func() { int x = 1; takeclosure(^{ x = 7; }); }
   //
-  if (getStmtClass() == BlockDeclRefExprClass) {
+  if (isa<BlockDeclRefExpr>(this)) {
     const BlockDeclRefExpr *BDR = cast<BlockDeclRefExpr>(this);
     if (!BDR->isByRef() && isa<VarDecl>(BDR->getDecl()))
       return MLV_NotBlockQualified;
@@ -807,7 +807,7 @@ Expr::isModifiableLvalueResult Expr::isModifiableLvalue(ASTContext &Ctx) const {
   }
   
   // Assigning to an 'implicit' property?
-  else if (getStmtClass() == ObjCKVCRefExprClass) {
+  else if (isa<ObjCKVCRefExpr>(this)) {
     const ObjCKVCRefExpr* KVCExpr = cast<ObjCKVCRefExpr>(this);
     if (KVCExpr->getSetterMethod() == 0)
       return MLV_NoSetterProperty;