instantiate-overloaded-arrow.cpp 231 B

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