p15.cpp revision 18fe084d72392a5ceaa1fab7d3f3f0d0f2538069
1// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify
2
3class NonCopyable {
4  NonCopyable(const NonCopyable&);
5};
6
7void capture_by_ref(NonCopyable nc, NonCopyable &ncr) {
8  int array[3];
9  (void)[&nc] () -> void {}; // expected-error{{lambda expressions are not supported yet}}
10  (void)[&ncr] () -> void {}; // expected-error{{lambda expressions are not supported yet}}
11  (void)[&array] () -> void {}; // expected-error{{lambda expressions are not supported yet}}
12}
13