xref: /minix3/external/bsd/llvm/dist/clang/test/PCH/chain-conversion-lookup.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -o - -chain-include %s -chain-include %s
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc #if !defined(PASS1)
4*f4a2713aSLionel Sambuc #define PASS1
5*f4a2713aSLionel Sambuc struct X {
6*f4a2713aSLionel Sambuc   operator int*();
7*f4a2713aSLionel Sambuc };
8*f4a2713aSLionel Sambuc 
9*f4a2713aSLionel Sambuc struct Z {
10*f4a2713aSLionel Sambuc   operator int*();
11*f4a2713aSLionel Sambuc };
12*f4a2713aSLionel Sambuc #elif !defined(PASS2)
13*f4a2713aSLionel Sambuc #define PASS2
14*f4a2713aSLionel Sambuc struct Y {
15*f4a2713aSLionel Sambuc   operator int *();
16*f4a2713aSLionel Sambuc };
17*f4a2713aSLionel Sambuc #else
main()18*f4a2713aSLionel Sambuc int main() {
19*f4a2713aSLionel Sambuc   X x;
20*f4a2713aSLionel Sambuc   int *ip = x.operator int*();
21*f4a2713aSLionel Sambuc   Y y;
22*f4a2713aSLionel Sambuc   int *ip2 = y.operator int*();
23*f4a2713aSLionel Sambuc   Z z;
24*f4a2713aSLionel Sambuc   int *ip3 = z.operator int*();
25*f4a2713aSLionel Sambuc }
26*f4a2713aSLionel Sambuc #endif
27