message sends, designators, and attributes. Instead of having the tentative parsing phase sometimes return an indicator to say what diagnostic to produce if parsing fails and sometimes ask the caller to run it again, consistently ask the caller to try parsing again if tentative parsing would fail or is otherwise unable to completely parse the lambda-introducer without producing an irreversible semantic effect. Mostly NFC, but we should recover marginally better in some error cases (avoiding duplicate diagnostics). llvm-svn: 361182
11 lines
568 B
C++
11 lines
568 B
C++
// RUN: %clang_cc1 -fsyntax-only -verify -x objective-c++ -std=c++11 %s
|
|
|
|
void foo() { // expected-note {{to match this '{'}}
|
|
int bar;
|
|
auto baz = [
|
|
bar( // expected-note {{to match this '('}} expected-note {{to match this '('}}
|
|
foo_undeclared() // expected-error{{use of undeclared identifier 'foo_undeclared'}}
|
|
/* ) */
|
|
] () { }; // expected-error{{expected ')'}}
|
|
} // expected-error{{expected ')'}} expected-error {{expected ',' or ']'}} expected-error{{expected ';' at end of declaration}} expected-error{{expected '}'}}
|