reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
// RUN: %clang_cc1 -fsyntax-only %s -verify 
// expected-no-diagnostics

namespace rdar10544564 {
  // Check that we don't attempt to use an overloaded operator& when
  // naming a pointer-to-member.
  struct X {
    void** operator & ();
  };

  struct Y
  {
  public:
    X member;
    X memfunc1();
    X memfunc2();
    X memfunc2(int);

    void test() {
      X Y::*data_mem_ptr = &Y::member;
      X (Y::*func_mem_ptr1)() = &Y::memfunc1;
      X (Y::*func_mem_ptr2)() = &Y::memfunc2;
    }
  };
  
  X Y::*data_mem_ptr = &Y::member;
  X (Y::*func_mem_ptr1)() = &Y::memfunc1;
  X (Y::*func_mem_ptr2)() = &Y::memfunc2;
}