]> granicus.if.org Git - clang/commitdiff
Properly use local variable declaration inside a switch case
authorAnton Korobeynikov <asl@math.spbu.ru>
Thu, 12 Jul 2007 15:26:50 +0000 (15:26 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Thu, 12 Jul 2007 15:26:50 +0000 (15:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39777 91177308-0d34-0410-b5e6-96231b3b80d8

AST/Expr.cpp

index b7dbcc7de60ac4f22d31daf849f7eb518bcd20a3..e22e80e76e1aaffe3a15171e330ba562bbdbd28a 100644 (file)
@@ -211,9 +211,10 @@ Expr::isLvalueResult Expr::isLvalue() {
     if (isa<VarDecl>(cast<DeclRefExpr>(this)->getDecl()))
       return LV_Valid;
     break;
-  case MemberExprClass: // C99 6.5.2.3p4
+  case MemberExprClass: // C99 6.5.2.3p4
     const MemberExpr *m = cast<MemberExpr>(this);
     return m->isArrow() ? LV_Valid : m->getBase()->isLvalue();
+  }
   case UnaryOperatorClass: // C99 6.5.3p4
     if (cast<UnaryOperator>(this)->getOpcode() == UnaryOperator::Deref)
       return LV_Valid;