brintos

brintos / llvm-project-archived public Read only

0
0
Text · 308 B · b4b1605 Raw
14 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify2// expected-no-diagnostics3 4class NonCopyable {5  NonCopyable(const NonCopyable&);6};7 8void capture_by_ref(NonCopyable nc, NonCopyable &ncr) {9  int array[3];10  (void)[&nc] () -> void {};11  (void)[&ncr] () -> void {}; 12  (void)[&array] () -> void {};13}14