summaryrefslogtreecommitdiff
path: root/test/Parser/objcxx14-protocol-in-template.mm
blob: 36da92e251f4c5a762c917d0596af19220466702 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++14 %s

template<class T> class vector {};
@protocol P @end

// expected-no-diagnostics

template <typename Functor> void F(Functor functor) {}

// Test protocol in template within lambda capture initializer context.
void z() {
  id<P> x = 0;
  (void)x;
  F( [ x = vector<id<P>>{} ] {} );
}