1 | // This is plagiarized from lit/SymbolFile/NativePDB/function-types-builtin.cpp. |
2 | void nullary() {} |
3 | |
4 | template<typename Arg> |
5 | void unary(Arg) { } |
6 | |
7 | template<typename A1, typename A2> |
8 | void binary(A1, A2) { } |
9 | |
10 | int varargs(int, int, ...) { return 0; } |
11 | |
12 | auto &ref = unary<bool>; |
13 | auto &ref2 = unary<volatile int*>; |
14 | auto &ref3 = varargs; |
15 | auto binp = &binary<int*, const int*>; |
16 | auto &binr = binary<int*, const int*>; |
17 | auto null = &nullary; |
18 | int main(int argc, char **argv) { |
19 | //% self.expect("target var ref", substrs=["(void (&)(bool))", "ref = 0x", |
20 | //% "&::ref = <no summary available>"]) |
21 | //% self.expect("target var ref2", |
22 | //% substrs=["(void (&)(volatile int *))", "ref2 = 0x"]) |
23 | //% self.expect("target var ref3", |
24 | //% substrs=["(int (&)(int, int, ...))", "ref3 = 0x"]) |
25 | //% self.expect("target var binp", |
26 | //% substrs=["(void (*)(int *, const int *))", "binp = 0x"]) |
27 | //% self.expect("target var binr", |
28 | //% substrs=["(void (&)(int *, const int *))", "binr = 0x"]) |
29 | //% self.expect("target var null", |
30 | //% substrs=["(void (*)())", "null = 0x"]) |
31 | return 0; |
32 | } |
33 | |