diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
commit | 461a67fa15370a9ec88f8f8a240bf7c123bb2029 (patch) | |
tree | 6942083d7d56bba40ec790a453ca58ad3baf6832 /test/Parser/objcxx11-invalid-lambda.cpp | |
parent | 75c3240472ba6ac2669ee72ca67eb72d4e2851fc (diff) |
Notes
Diffstat (limited to 'test/Parser/objcxx11-invalid-lambda.cpp')
-rw-r--r-- | test/Parser/objcxx11-invalid-lambda.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Parser/objcxx11-invalid-lambda.cpp b/test/Parser/objcxx11-invalid-lambda.cpp new file mode 100644 index 0000000000000..74c5636b6a079 --- /dev/null +++ b/test/Parser/objcxx11-invalid-lambda.cpp @@ -0,0 +1,10 @@ +// 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{{use of undeclared identifier 'foo_undeclared'}} + /* ) */ + ] () { }; // expected-error{{expected ')'}} +} // expected-error{{expected ')'}} expected-error{{expected ';' at end of declaration}} expected-error{{expected '}'}} |