C++: Add support for C++11 range-based 'for' loops

Change-Id: I7eef048a7952a79f031ae3d0abba68e3c5ffbfb8
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Flex Ferrum
2012-02-19 16:33:25 +04:00
committed by Roberto Raggi
parent 7f943caedb
commit da2aa0df72
21 changed files with 328 additions and 5 deletions

View File

@@ -407,6 +407,10 @@ Scope *CheckSymbols::enclosingScope() const
if (foreachStmt->symbol)
return foreachStmt->symbol;
} else if (RangeBasedForStatementAST *rangeBasedForStmt = ast->asRangeBasedForStatement()) {
if (rangeBasedForStmt->symbol)
return rangeBasedForStmt->symbol;
} else if (SwitchStatementAST *switchStmt = ast->asSwitchStatement()) {
if (switchStmt->symbol)
return switchStmt->symbol;