From 74382504e28481be4572031a873af6377595ac1d Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 26 Oct 2016 02:00:00 +0000 Subject: [PATCH] [Sema] Handle CaseStmt and DefaultStmt as SwitchCase Summary: rsmith Differential Revision: https://reviews.llvm.org/D25665 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285159 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/JumpDiagnostics.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Sema/JumpDiagnostics.cpp b/lib/Sema/JumpDiagnostics.cpp index 0d0c27dbfc..899d3fa83c 100644 --- a/lib/Sema/JumpDiagnostics.cpp +++ b/lib/Sema/JumpDiagnostics.cpp @@ -550,10 +550,8 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S, // order to avoid blowing out the stack. while (true) { Stmt *Next; - if (CaseStmt *CS = dyn_cast(SubStmt)) - Next = CS->getSubStmt(); - else if (DefaultStmt *DS = dyn_cast(SubStmt)) - Next = DS->getSubStmt(); + if (SwitchCase *SC = dyn_cast(SubStmt)) + Next = SC->getSubStmt(); else if (LabelStmt *LS = dyn_cast(SubStmt)) Next = LS->getSubStmt(); else -- 2.40.0