1e31e606fSDouglas Gregor // RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify 2*c6e68daaSAndy Gibbs // expected-no-diagnostics 3e31e606fSDouglas Gregor 4e31e606fSDouglas Gregor class NonCopyable { 5e31e606fSDouglas Gregor NonCopyable(const NonCopyable&); 6e31e606fSDouglas Gregor }; 7e31e606fSDouglas Gregor capture_by_ref(NonCopyable nc,NonCopyable & ncr)8e31e606fSDouglas Gregorvoid capture_by_ref(NonCopyable nc, NonCopyable &ncr) { 9199cec76SDouglas Gregor int array[3]; 10656bc62aSDouglas Gregor (void)[&nc] () -> void {}; 11656bc62aSDouglas Gregor (void)[&ncr] () -> void {}; 12656bc62aSDouglas Gregor (void)[&array] () -> void {}; 13e31e606fSDouglas Gregor } 14