blob: 0bbb9ae7440c2388a0611764526b89e88dcf7cee [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&); // expected-note 2 {{implicitly declared private here}}
5};
6
7void capture_by_copy(NonCopyable nc, NonCopyable &ncr) {
8 // FIXME: error messages should talk about capture
9 [nc] { }; // expected-error{{field of type 'NonCopyable' has private copy constructor}} \
10 // expected-error{{lambda expressions are not supported yet}}
11 [ncr] { }; // expected-error{{field of type 'NonCopyable' has private copy constructor}} \
12 // expected-error{{lambda expressions are not supported yet}}
13}
14
15// FIXME: arrays!