1 | // RUN: %clang_cc1 %s -emit-llvm-only |
---|---|
2 | class T |
3 | {}; |
4 | |
5 | void print(const char *t); |
6 | |
7 | T& operator<< (T& t,const char* c) |
8 | { |
9 | print(c); |
10 | return t; |
11 | } |
12 | |
13 | |
14 | int main() |
15 | { |
16 | T t; |
17 | print("foo"); |
18 | t<<"foo"; |
19 | |
20 | return 0; |
21 | } |
22 | |
23 |
1 | // RUN: %clang_cc1 %s -emit-llvm-only |
---|---|
2 | class T |
3 | {}; |
4 | |
5 | void print(const char *t); |
6 | |
7 | T& operator<< (T& t,const char* c) |
8 | { |
9 | print(c); |
10 | return t; |
11 | } |
12 | |
13 | |
14 | int main() |
15 | { |
16 | T t; |
17 | print("foo"); |
18 | t<<"foo"; |
19 | |
20 | return 0; |
21 | } |
22 | |
23 |