[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Parser / cxx-ambig-paren-expr-asan.cpp
blob7b9e51f12c95e5c5ba582ede67710d0eda244de6
1 // RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
3 // This syntax error used to cause use-after free due to token local buffer
4 // in ParseCXXAmbiguousParenExpression.
5 int H((int()[)]);
6 // expected-error@-1 {{expected expression}}
7 // expected-error@-2 {{expected ']'}}
8 // expected-note@-3 {{to match this '['}}