llvm-project/clang/test/Parser/cxx-ambig-paren-expr-asan.cpp
Alexey Bataev 703a93c4e6 PR23057: fix use-after-free due to local token buffer in ParseCXXAmbiguousParenExpression, by Dmitry Polukhin
Differential Revision: http://reviews.llvm.org/D16572
A    test/Parser/cxx-ambig-paren-expr-asan.cpp
M    lib/Parse/ParseExprCXX.cpp

llvm-svn: 259750
2016-02-04 04:22:09 +00:00

10 lines
379 B
C++

// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
// This syntax error used to cause use-after free due to token local buffer
// in ParseCXXAmbiguousParenExpression.
int H((int()[)]);
// expected-error@-1 {{expected expression}}
// expected-error@-2 {{expected ']'}}
// expected-note@-3 {{to match this '['}}
// expected-error@-4 {{expected ';' after top level declarator}}