mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-01 10:16:09 +00:00

In the context where we break one tok::greatergreater into two tok::greater in order to correctly update the cached tokens; update the CachedTokens with two tok::greater only if ParseGreaterThanInTemplateList clients asks to consume the last token. Otherwise we only need to add one because the second is already added later on, as a not yet cached token. Differential Revision: http://reviews.llvm.org/D16906 rdar://problem/24488367 llvm-svn: 259910
16 lines
339 B
Plaintext
16 lines
339 B
Plaintext
// 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>>{} ] {} );
|
|
}
|