forked from qt-creator/qt-creator
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:
5
tests/auto/cplusplus/cxx11/data/rangeFor.1.cpp
Normal file
5
tests/auto/cplusplus/cxx11/data/rangeFor.1.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
int main() {
|
||||
for (int x : {1, 2, 3}) {}
|
||||
for (int x : foo) ;
|
||||
for (int& x : array) x += 2;
|
||||
}
|
||||
Reference in New Issue
Block a user