1 // RUN: %clang_cc1 -fsyntax-only -Wunused-parameter -verify -std=c++11 %s
7 template<typename U
> U
f3(U x
);
8 template<typename U
> U
f4(U x
);
9 template<typename U
> U
f5(U
);
12 template<typename T
> T X
<T
>::f0(T x
) { return x
; }
13 template<typename T
> T X
<T
>::f1(T
) { return T(); }
14 template<typename T
> T X
<T
>::f2(T x
) { return T(); } // expected-warning{{unused parameter 'x'}}
15 template<typename T
> template<typename U
> U X
<T
>::f3(U x
) { return x
; }
16 template<typename T
> template<typename U
> U X
<T
>::f4(U
) { return U(); }
17 template<typename T
> template<typename U
> U X
<T
>::f5(U x
) { return U(); } // expected-warning{{unused parameter 'x'}}
19 void test_X(X
<int> &x
, int i
) {
28 // Make sure both parameters aren't considered unused.
29 template <typename
... T
>
30 static int test_pack(T
... t
, T
... s
)
32 auto l
= [&t
...]() { return sizeof...(s
); };
36 // Do not warn on naked functions.
37 [[gnu::naked
]] int nakedFunction(int a
, float b
, const char* c
) { ; }
38 __attribute__((naked
)) void nakedFunction(int a
, int b
) { ; }