| // RUN: %clang_cc1 -fsyntax-only -verify %s |
| class Derived1 : public Base { }; |
| class Derived2 : public Base { }; |
| void f0(volatile Base *b, Derived1 *d1, const Derived2 *d2) { |
| if (d1 >= d2) // expected-error{{comparison of distinct}} |
| void f1(volatile Base *b, Derived1 *d1, const Derived2 *d2) { |
| if (d1 == d2) // expected-error{{comparison of distinct}} |
| int ptrcmp1(void *a, int *b) { |
| int ptrcmp2(long *a, int *b) { |
| return a < b; // expected-error{{distinct}} |
| // PR5509 - Multi-level pointers |
| typedef IntPtr *IntPtrPtr; |
| typedef IntPtr const *IntPtrConstPtr; |