aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/overloadable.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/overloadable.c')
-rw-r--r--test/Sema/overloadable.c14
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);
+}