[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / SemaCXX / pr48848.cpp
blob064dbb137082350c89c9d56292edc5104d3effd1
1 // RUN: %clang_cc1 -std=c++17 -fblocks -DSHOW_MS -Wno-unused-value -fms-compatibility -fdelayed-template-parsing -fsyntax-only -verify %s
2 template <typename RT, typename ET>
3 void Decider(const RT &sp, ET &ep) {
4 [=](auto i) { ep[i] = sp[i + j]; };
5 // expected-error@-1 {{use of undeclared identifier 'j'}}
8 template <typename EMT> void LS() {
9 int *ep;
10 Decider(5, ep);
13 void runChapter4() {
14 LS<int>(); // expected-note {{in instantiation of}}