| 1 |
// RUN: %clang_cc1 -std=c++11 -verify %s -Wno-tautological-compare |
| 2 |
|
| 3 |
template <typename T> |
| 4 |
void f(int i, float f, bool b, char c, int* pi, T* pt) { |
| 5 |
(void)(i*i); |
| 6 |
(void)(i*f); |
| 7 |
(void)(i*b); |
| 8 |
(void)(i*c); |
| 9 |
(void)(i*pi); // expected-error {{invalid operands to binary expression}} |
| 10 |
(void)(i*pt); // FIXME |
| 11 |
|
| 12 |
(void)(i/i); |
| 13 |
(void)(i/f); |
| 14 |
(void)(i/b); |
| 15 |
(void)(i/c); |
| 16 |
(void)(i/pi); // expected-error {{invalid operands to binary expression}} |
| 17 |
(void)(i/pt); // FIXME |
| 18 |
|
| 19 |
(void)(i-i); |
| 20 |
(void)(i-f); |
| 21 |
(void)(i-b); |
| 22 |
(void)(i-c); |
| 23 |
(void)(i-pi); // expected-error {{invalid operands to binary expression}} |
| 24 |
(void)(i-pt); // FIXME |
| 25 |
|
| 26 |
(void)(i<i); |
| 27 |
(void)(i<f); |
| 28 |
(void)(i<b); |
| 29 |
(void)(i<c); |
| 30 |
(void)(i<pi); // expected-error {{comparison between pointer and integer}} |
| 31 |
(void)(i<pt); // FIXME |
| 32 |
|
| 33 |
(void)(i==i); |
| 34 |
(void)(i==f); |
| 35 |
(void)(i==b); |
| 36 |
(void)(i==c); |
| 37 |
(void)(i==pi); // expected-error {{comparison between pointer and integer}} |
| 38 |
(void)(i==pt); // FIXME |
| 39 |
} |
| 40 |
|