brintos

brintos / llvm-project-archived public Read only

0
0
Text · 274 B · 93978f2 Raw
15 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only %s -verify2 3struct Data {4  char *a;5  char *b;6  bool *c;7};8 9int main() {10  Data in;11  in.a = new char[](); // expected-error {{cannot determine allocated array size from initializer}}12  in.c = new bool[100]();13  in.b = new char[100]();14}15