From: Chris Lattner Date: Wed, 4 Mar 2009 04:30:02 +0000 (+0000) Subject: fix infinite recursion X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=91ee0140ecb60b5c1402edc9e577257636c4ca60;p=clang fix infinite recursion git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66014 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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(getSubStmt())) + while (const CaseStmt *CS2 = dyn_cast(CS->getSubStmt())) CS = CS2; return SourceRange(CaseLoc, CS->getSubStmt()->getLocEnd());