diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
commit | 45b533945f0851ec234ca846e1af5ee1e4df0b6e (patch) | |
tree | 0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /test/Sema/overloadable.c | |
parent | 7e86edd64bfae4e324224452e4ea879b3371a4bd (diff) |
Notes
Diffstat (limited to 'test/Sema/overloadable.c')
-rw-r--r-- | test/Sema/overloadable.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Sema/overloadable.c b/test/Sema/overloadable.c index bdd471477b47..3120649dbc02 100644 --- a/test/Sema/overloadable.c +++ b/test/Sema/overloadable.c @@ -85,3 +85,17 @@ void local() { void after_local_1(int) __attribute__((overloadable)); // expected-error {{conflicting types}} void after_local_2(int); // expected-error {{must have the 'overloadable' attribute}} void after_local_3(int) __attribute__((overloadable)); + +// Make sure we allow C-specific conversions in C. +void conversions() { + void foo(char *c) __attribute__((overloadable)); + void foo(char *c) __attribute__((overloadable, enable_if(c, "nope.jpg"))); + + void *ptr; + foo(ptr); + + void multi_type(unsigned char *c) __attribute__((overloadable)); + void multi_type(signed char *c) __attribute__((overloadable)); + unsigned char *c; + multi_type(c); +} |