Douglas Gregor | 5f2bfd4 | 2009-02-13 00:10:09 +0000 | [diff] [blame] | 1 | // RUN: clang -emit-llvm %s -o - | grep _Z1fPA10_1X |
| 2 | int __attribute__((overloadable)) f(int x) { return x; } |
| 3 | float __attribute__((overloadable)) f(float x) { return x; } |
| 4 | double __attribute__((overloadable)) f(double x) { return x; } |
| 5 | double _Complex __attribute__((overloadable)) f(double _Complex x) { return x; } |
| 6 | typedef short v4hi __attribute__ ((__vector_size__ (8))); |
| 7 | v4hi __attribute__((overloadable)) f(v4hi x) { return x; } |
| 8 | |
| 9 | struct X { }; |
| 10 | void __attribute__((overloadable)) f(struct X (*ptr)[10]) { } |
| 11 | |
Douglas Gregor | 219cc61 | 2009-02-13 01:28:03 +0000 | [diff] [blame] | 12 | void __attribute__((overloadable)) f(int x, int y, ...) { } |
| 13 | |
Douglas Gregor | 5f2bfd4 | 2009-02-13 00:10:09 +0000 | [diff] [blame] | 14 | int main() { |
| 15 | int iv = 17; |
| 16 | float fv = 3.0f; |
| 17 | double dv = 4.0; |
| 18 | double _Complex cdv; |
| 19 | v4hi vv; |
| 20 | |
| 21 | iv = f(iv); |
| 22 | fv = f(fv); |
| 23 | dv = f(dv); |
| 24 | cdv = f(cdv); |
| 25 | vv = f(vv); |
| 26 | } |