| // RUN: %clang_cc1 -fsyntax-only -verify %s |
| template <int A, int B> void foo() { |
| (void)(A == A); // expected-warning {{self-comparison always evaluates to true}} |
| template <int A, int B> struct S1 { |
| (void)(A == A); // expected-warning {{self-comparison always evaluates to true}} |
| template <int A, int B> struct S2 { |
| template <typename T> T foo() { |
| (void)(A == A); // expected-warning {{self-comparison always evaluates to true}} |
| template <int A, int B> void foo() { |
| (void)(A == A); // expected-warning {{self-comparison always evaluates to true}} |
| template <int A> struct S4 { |
| template <int B> void foo() { |
| (void)(A == A); // expected-warning {{self-comparison always evaluates to true}} |
| template <int X> void foo2() { |
| S2<1, 1> s2; s2.foo<void>(); |