llvm-project/clang/test/PCH/cxx2a-for-init-statement.cpp
Richard Smith 8baa50013c [cxx2a] P0614R1: Support init-statements in range-based for loops.
We don't yet support this for the case where a range-based for loop is
implicitly rewritten to an ObjC for..in statement.

llvm-svn: 343350
2018-09-28 18:44:09 +00:00

9 lines
232 B
C++

// RUN: %clang_cc1 -emit-pch -std=c++2a -o %t %s
// RUN: %clang_cc1 -std=c++2a -x ast -ast-print %t | FileCheck %s
void f() {
// CHECK: for (int arr[3]; int n : arr) {
// CHECK-NEXT: }
for (int arr[3]; int n : arr) {}
}