Fixed bug for CaseStmt where the child_begin/child_end methods were not
including the expressions in the case statement itself (not the body of
the case).

This required moving SubStmt out of SwitchCase into CaseStmt and DefaultStmt
respectively.  getSubStmt() now is a virtual call for SwitchCase, but is
a direct (static) call for CaseStmt and DefaultStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41609 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/Stmt.cpp b/AST/Stmt.cpp
index e218eda..17f59a4 100644
--- a/AST/Stmt.cpp
+++ b/AST/Stmt.cpp
@@ -97,9 +97,13 @@
 Stmt::child_iterator CompoundStmt::child_begin() { return &Body[0]; }
 Stmt::child_iterator CompoundStmt::child_end() { return &Body[0]+Body.size(); }
 
-// SwitchCase
-Stmt::child_iterator SwitchCase::child_begin() { return &SubStmt; }
-Stmt::child_iterator SwitchCase::child_end() { return &SubStmt+1; }
+// CaseStmt
+Stmt::child_iterator CaseStmt::child_begin() { return &SubExprs[0]; }
+Stmt::child_iterator CaseStmt::child_end() { return &SubExprs[END_EXPR]; }
+
+// DefaultStmt
+Stmt::child_iterator DefaultStmt::child_begin() { return &SubStmt; }
+Stmt::child_iterator DefaultStmt::child_end() { return &SubStmt+1; }
 
 // LabelStmt
 Stmt::child_iterator LabelStmt::child_begin() { return &SubStmt; }