101d08018b7cf5ce1601707cfd7a84d22015fc04eDouglas Gregor// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify 201d08018b7cf5ce1601707cfd7a84d22015fc04eDouglas Gregor 301d08018b7cf5ce1601707cfd7a84d22015fc04eDouglas Gregorclass NonCopyable { 401d08018b7cf5ce1601707cfd7a84d22015fc04eDouglas Gregor NonCopyable(const NonCopyable&); 501d08018b7cf5ce1601707cfd7a84d22015fc04eDouglas Gregor}; 601d08018b7cf5ce1601707cfd7a84d22015fc04eDouglas Gregor 701d08018b7cf5ce1601707cfd7a84d22015fc04eDouglas Gregorvoid capture_by_ref(NonCopyable nc, NonCopyable &ncr) { 818fe084d72392a5ceaa1fab7d3f3f0d0f2538069Douglas Gregor int array[3]; 9b326ca8ffbea96f9cc8a457b0f57be880304a6f5Douglas Gregor (void)[&nc] () -> void {}; 10b326ca8ffbea96f9cc8a457b0f57be880304a6f5Douglas Gregor (void)[&ncr] () -> void {}; 11b326ca8ffbea96f9cc8a457b0f57be880304a6f5Douglas Gregor (void)[&array] () -> void {}; 1201d08018b7cf5ce1601707cfd7a84d22015fc04eDouglas Gregor} 13