blob: ec9d6b9da39d09e0c0eea35559aff91dbbeb5ab2 [file] [log] [blame]
Alexey Bataev703a93c2016-02-04 04:22:09 +00001// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
2
3// This syntax error used to cause use-after free due to token local buffer
4// in ParseCXXAmbiguousParenExpression.
5int H((int()[)]);
6// expected-error@-1 {{expected expression}}
7// expected-error@-2 {{expected ']'}}
8// expected-note@-3 {{to match this '['}}
9// expected-error@-4 {{expected ';' after top level declarator}}