29 lines · c
1// RUN: %clang_cc1 %s -fsyntax-only -verify2// expected-no-diagnostics3// PR94064 5typedef struct {6 char *str;7 char *str2;8} Class;9 10typedef union {11 Class *object;12} Instance __attribute__((transparent_union));13 14__attribute__((overloadable)) void Class_Init(Instance this, char *str, void *str2) {15 this.object->str = str;16 this.object->str2 = str2;17}18 19__attribute__((overloadable)) void Class_Init(Instance this, char *str) {20 this.object->str = str;21 this.object->str2 = str;22}23 24int main(void) {25 Class obj;26 Class_Init(&obj, "Hello ", " World");27}28 29