1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify %s 2*f4a2713aSLionel Sambuc // expected-no-diagnostics 3*f4a2713aSLionel Sambuc // PR5488 4*f4a2713aSLionel Sambuc 5*f4a2713aSLionel Sambuc struct X { 6*f4a2713aSLionel Sambuc int x; 7*f4a2713aSLionel Sambuc }; 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc struct Iter { 10*f4a2713aSLionel Sambuc X* operator->(); 11*f4a2713aSLionel Sambuc }; 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc template <typename T> Foo()14*f4a2713aSLionel Sambucvoid Foo() { 15*f4a2713aSLionel Sambuc (void)Iter()->x; 16*f4a2713aSLionel Sambuc } 17*f4a2713aSLionel Sambuc Func()18*f4a2713aSLionel Sambucvoid Func() { 19*f4a2713aSLionel Sambuc Foo<int>(); 20*f4a2713aSLionel Sambuc } 21*f4a2713aSLionel Sambuc 22