[cfe-commits] r39777 - /cfe/trunk/AST/Expr.cpp

Anton Korobeynikov asl at math.spbu.ru
Thu Jul 12 08:26:51 PDT 2007


Author: asl
Date: Thu Jul 12 10:26:50 2007
New Revision: 39777

URL: http://llvm.org/viewvc/llvm-project?rev=39777&view=rev
Log:
Properly use local variable declaration inside a switch case

Modified:
    cfe/trunk/AST/Expr.cpp

Modified: cfe/trunk/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/Expr.cpp?rev=39777&r1=39776&r2=39777&view=diff

==============================================================================
--- cfe/trunk/AST/Expr.cpp (original)
+++ cfe/trunk/AST/Expr.cpp Thu Jul 12 10:26:50 2007
@@ -211,9 +211,10 @@
     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;





More information about the cfe-commits mailing list