blob: c4deba9c974398064a23c50908faa41a81aa864f [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 Gregor656bc622012-02-09 08:26:42 +00009 (void)[&nc] () -> void {};
10 (void)[&ncr] () -> void {};
11 (void)[&array] () -> void {};
Douglas Gregore31e6062012-02-07 10:09:13 +000012}