[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaObjCXX / vla.mm
blob7ee15743efa3748e748c01ea37525c9ba8617f9c
1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-vla %s
2 // expected-no-diagnostics
4 @interface Data
5 - (unsigned)length;
6 - (void)getData:(void*)buffer;
7 @end
9 void test(Data *d) {
10   char buffer[[d length]];
11   [d getData:buffer];