From fdd75663fffeb2058a7847975e50837e61200593 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Thu, 12 Jul 2007 15:26:50 +0000 Subject: [PATCH] Properly use local variable declaration inside a switch case git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39777 91177308-0d34-0410-b5e6-96231b3b80d8 --- AST/Expr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AST/Expr.cpp b/AST/Expr.cpp index b7dbcc7de6..e22e80e76e 100644 --- a/AST/Expr.cpp +++ b/AST/Expr.cpp @@ -211,9 +211,10 @@ Expr::isLvalueResult Expr::isLvalue() { if (isa(cast(this)->getDecl())) return LV_Valid; break; - case MemberExprClass: // C99 6.5.2.3p4 + case MemberExprClass: { // C99 6.5.2.3p4 const MemberExpr *m = cast(this); return m->isArrow() ? LV_Valid : m->getBase()->isLvalue(); + } case UnaryOperatorClass: // C99 6.5.3p4 if (cast(this)->getOpcode() == UnaryOperator::Deref) return LV_Valid; -- 2.40.0