diff options
author | Flex Ferrum <flexferrum@gmail.com> | 2012-02-19 16:33:25 +0400 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2012-02-21 15:27:00 +0100 |
commit | da2aa0df72250811acbb6af51abc961b38bed77a (patch) | |
tree | 696c211293b82b7cb470f13899dc85d0da83d708 /src/plugins/cpptools/cppchecksymbols.cpp | |
parent | 7f943caedbc583d73a7218d1f922a3e8afd2c0b4 (diff) | |
download | qt-creator-da2aa0df72250811acbb6af51abc961b38bed77a.tar.gz |
C++: Add support for C++11 range-based 'for' loops
Change-Id: I7eef048a7952a79f031ae3d0abba68e3c5ffbfb8
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/plugins/cpptools/cppchecksymbols.cpp')
-rw-r--r-- | src/plugins/cpptools/cppchecksymbols.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cppchecksymbols.cpp b/src/plugins/cpptools/cppchecksymbols.cpp index 2a3c9d2289..fc83c054e0 100644 --- a/src/plugins/cpptools/cppchecksymbols.cpp +++ b/src/plugins/cpptools/cppchecksymbols.cpp @@ -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; |