blob: 605265b80a08825ee1f80f5a49dfaa072c2d7238 [file] [log] [blame]
Douglas Gregore31e6062012-02-07 10:09:13 +00001// 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) {
Douglas Gregor199cec72012-02-09 02:45:47 +00008 int array[3];
Douglas Gregor8c50e7c2012-02-09 00:47:04 +00009 (void)[&nc] () -> void {}; // expected-error{{lambda expressions are not supported yet}}
10 (void)[&ncr] () -> void {}; // expected-error{{lambda expressions are not supported yet}}
Douglas Gregor199cec72012-02-09 02:45:47 +000011 (void)[&array] () -> void {}; // expected-error{{lambda expressions are not supported yet}}
Douglas Gregore31e6062012-02-07 10:09:13 +000012}