r285159 - [Sema] Handle CaseStmt and DefaultStmt as SwitchCase
Vitaly Buka via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 25 19:00:00 PDT 2016
Author: vitalybuka
Date: Tue Oct 25 21:00:00 2016
New Revision: 285159
URL: http://llvm.org/viewvc/llvm-project?rev=285159&view=rev
Log:
[Sema] Handle CaseStmt and DefaultStmt as SwitchCase
Summary: rsmith
Differential Revision: https://reviews.llvm.org/D25665
Modified:
cfe/trunk/lib/Sema/JumpDiagnostics.cpp
Modified: cfe/trunk/lib/Sema/JumpDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/JumpDiagnostics.cpp?rev=285159&r1=285158&r2=285159&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/JumpDiagnostics.cpp (original)
+++ cfe/trunk/lib/Sema/JumpDiagnostics.cpp Tue Oct 25 21:00:00 2016
@@ -550,10 +550,8 @@ void JumpScopeChecker::BuildScopeInforma
// order to avoid blowing out the stack.
while (true) {
Stmt *Next;
- if (CaseStmt *CS = dyn_cast<CaseStmt>(SubStmt))
- Next = CS->getSubStmt();
- else if (DefaultStmt *DS = dyn_cast<DefaultStmt>(SubStmt))
- Next = DS->getSubStmt();
+ if (SwitchCase *SC = dyn_cast<SwitchCase>(SubStmt))
+ Next = SC->getSubStmt();
else if (LabelStmt *LS = dyn_cast<LabelStmt>(SubStmt))
Next = LS->getSubStmt();
else
More information about the cfe-commits
mailing list