brintos

brintos / llvm-project-archived public Read only

0
0
Text · 457 B · 064dbb1 Raw
16 lines · cpp
1// RUN: %clang_cc1 -std=c++17 -fblocks -DSHOW_MS -Wno-unused-value -fms-compatibility -fdelayed-template-parsing -fsyntax-only -verify %s2template <typename RT, typename ET>3void Decider(const RT &sp, ET &ep) {4  [=](auto i) { ep[i] = sp[i + j]; };5  // expected-error@-1 {{use of undeclared identifier 'j'}}6}7 8template <typename EMT> void LS() {9  int *ep;10  Decider(5, ep);11}12 13void runChapter4() {14  LS<int>(); // expected-note {{in instantiation of}}15}16