// RUN: %clang_cc1 -fsyntax-only -verify -Wno-unused %s
// expected-no-diagnostics
// Tests that overload resolution is treated as an unevaluated context.
// PR5541
structFoo{
Foo *next;};template<typename>structBar{};template<typename T>classWibble{typedef Bar<T>B;staticinline B *concrete(Foo *node){int a[sizeof(T)?-1:-1];returnreinterpret_cast<B *>(node);}public:classIt{
Foo *i;public:inlineoperator B *()const{returnconcrete(i);}inlinebooloperator!=(const It &o)const{return i !=
o.i;}};};voidf(){
Wibble<void*>::It a, b;
a != b;}