C++11: Allow brace-init-list in range-for statement.

Also drop the unused 'initializer' member from
RangeBasedForStatementAST.

Change-Id: I078ebbc85cafa643af4bfe62d698bf7de71360e4
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Christian Kamm
2012-09-18 09:50:23 +02:00
committed by hjk
parent ecd54059d3
commit 9bd86e7d68
12 changed files with 12 additions and 22 deletions
@@ -0,0 +1,5 @@
int main() {
for (int x : {1, 2, 3}) {}
for (int x : foo) ;
for (int& x : array) x += 2;
}
+1
View File
@@ -141,6 +141,7 @@ void tst_cxx11::parse_data()
QTest::newRow("defaultdeleteInitializer.1") << "defaultdeleteInitializer.1.cpp" << "";
QTest::newRow("refQualifier.1") << "refQualifier.1.cpp" << "";
QTest::newRow("alignofAlignas.1") << "alignofAlignas.1.cpp" << "";
QTest::newRow("rangeFor.1") << "rangeFor.1.cpp" << "";
}
void tst_cxx11::parse()