aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-04 04:30:02 +0000
committerChris Lattner <sabre@nondot.org>2009-03-04 04:30:02 +0000
commit91ee0140ecb60b5c1402edc9e577257636c4ca60 (patch)
tree94f22cf037dae9e23957294f57cd61ec9af4f181
parent3fb94a4918bd427fdb12df997dd87fd1017f0388 (diff)
fix infinite recursion
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66014 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/Stmt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h
index ea60603606..465b26ff23 100644
--- a/include/clang/AST/Stmt.h
+++ b/include/clang/AST/Stmt.h
@@ -471,7 +471,7 @@ public:
virtual SourceRange getSourceRange() const {
// Handle deeply nested case statements with iteration instead of recursion.
const CaseStmt *CS = this;
- while (const CaseStmt *CS2 = dyn_cast<CaseStmt>(getSubStmt()))
+ while (const CaseStmt *CS2 = dyn_cast<CaseStmt>(CS->getSubStmt()))
CS = CS2;
return SourceRange(CaseLoc, CS->getSubStmt()->getLocEnd());