vla.mm revision 3c3aaf9bdff81af40212e9a1ac517ad7c793d5cc
1// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3@interface Data
4- (unsigned)length;
5- (void)getData:(void*)buffer;
6@end
7
8void test(Data *d) {
9  char buffer[[d length]]; // expected-error{{variable length arrays are not permitted in C++}}
10  [d getData:buffer];
11}
12
13