Revert "Reland '[flang] Allow to pass an async id to allocate the descriptor (#118713...
[llvm-project.git] / clang / test / CXX / temp / temp.decls / temp.variadic / parameter-matching.cpp
blob79340c3741a8860b6029924e28b645aef32ca757
1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
3 // Check for template type parameter pack (mis-)matches with template
4 // type parameters.
5 template<typename ...T> struct X0t;
6 template<typename ...T> struct X0t;
8 template<typename ...T> struct X1t; // expected-note{{previous template type parameter pack declared here}}
9 template<typename T> struct X1t; // expected-error{{template type parameter conflicts with previous template type parameter pack}}
11 template<typename T> struct X2t; // expected-note{{previous template type parameter declared here}}
12 template<typename ...T> struct X2t; // expected-error{{template type parameter pack conflicts with previous template type parameter}}
14 template<template<typename ...T> class> struct X0t_intt;
15 template<template<typename ...T> class> struct X0t_intt;
17 template<template<typename ...T> class> struct X1t_intt; // expected-note{{previous template type parameter pack declared here}}
18 template<template<typename T> class> struct X1t_intt; // expected-error{{template type parameter conflicts with previous template type parameter pack}}
20 template<template<typename T> class> struct X2t_intt; // expected-note{{previous template type parameter declared here}}
21 template<template<typename ...T> class> struct X2t_intt; // expected-error{{template type parameter pack conflicts with previous template type parameter}}
23 template<int ...Values> struct X1nt; // expected-note{{previous non-type template parameter pack declared here}}
24 template<int Values> struct X1nt; // expected-error{{non-type template parameter conflicts with previous non-type template parameter pack}}
26 template<template<class T> class> class X1tt; // expected-note{{previous template template parameter declared here}}
27 template<template<class T> class...> class X1tt; // expected-error{{template template parameter pack conflicts with previous template template parameter}}
29 // Check for matching with out-of-line definitions
30 namespace rdar8859985 {
31 template<typename ...> struct tuple { };
32 template<int ...> struct int_tuple { };
34 template<typename T>
35 struct X {
36 template<typename ...Args1, int ...Indices1>
37 X(tuple<Args1...>, int_tuple<Indices1...>);
40 template<typename T>
41 template<typename ...Args1, int ...Indices1>
42 X<T>::X(tuple<Args1...>, int_tuple<Indices1...>) {}