brintos

brintos / llvm-project-archived public Read only

0
0
Text · 325 B · 0676463 Raw
15 lines · cpp
1// RUN: %clang_cc1 -std=c++17 -fsyntax-only -verify %s -fblocks2 3struct S {4  int i : 1;5  int j;6};7 8void run(void (^)());9void test() {10  auto [i, j] = S{-1, 42}; // expected-note {{'i' declared here}}11  run(^{12    (void)i; // expected-error {{reference to local binding 'i' declared in enclosing function 'test'}}13  });14}15