objcxx11-invalid-lambda.cpp 568 B

12345678910
  1. // RUN: %clang_cc1 -fsyntax-only -verify -x objective-c++ -std=c++11 %s
  2. void foo() { // expected-note {{to match this '{'}}
  3. int bar;
  4. auto baz = [
  5. bar( // expected-note {{to match this '('}} expected-note {{to match this '('}}
  6. foo_undeclared() // expected-error{{use of undeclared identifier 'foo_undeclared'}}
  7. /* ) */
  8. ] () { }; // expected-error{{expected ')'}}
  9. } // expected-error{{expected ')'}} expected-error {{expected ',' or ']'}} expected-error{{expected ';' at end of declaration}} expected-error{{expected '}'}}