1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 template <int A
, int B
> void foo() {
4 (void)(A
== A
); // expected-warning {{self-comparison always evaluates to true}}
7 template <int A
, int B
> struct S1
{
9 (void)(A
== A
); // expected-warning {{self-comparison always evaluates to true}}
14 template <int A
, int B
> struct S2
{
15 template <typename T
> T
foo() {
16 (void)(A
== A
); // expected-warning {{self-comparison always evaluates to true}}
22 template <int A
, int B
> void foo() {
23 (void)(A
== A
); // expected-warning {{self-comparison always evaluates to true}}
28 template <int A
> struct S4
{
29 template <int B
> void foo() {
30 (void)(A
== A
); // expected-warning {{self-comparison always evaluates to true}}
36 template <int X
> void foo2() {
43 S1
<1, 1> s1
; s1
.foo();
44 S2
<1, 1> s2
; s2
.foo
<void>();
45 S3 s3
; s3
.foo
<1, 1>();
46 S4
<1> s4
; s4
.foo
<1>();