chain-conversion-lookup.cpp 390 B

1234567891011121314151617181920212223242526
  1. // RUN: %clang_cc1 %s -emit-llvm -o - -chain-include %s -chain-include %s
  2. #if !defined(PASS1)
  3. #define PASS1
  4. struct X {
  5. operator int*();
  6. };
  7. struct Z {
  8. operator int*();
  9. };
  10. #elif !defined(PASS2)
  11. #define PASS2
  12. struct Y {
  13. operator int *();
  14. };
  15. #else
  16. int main() {
  17. X x;
  18. int *ip = x.operator int*();
  19. Y y;
  20. int *ip2 = y.operator int*();
  21. Z z;
  22. int *ip3 = z.operator int*();
  23. }
  24. #endif