Home | History | Annotate | Download | only in Sema
      1 // RUN: %clang_cc1 %s -fsyntax-only -verify
      2 // rdar:// 9129552
      3 // PR9406
      4 
      5 typedef struct {
      6 	char *str;
      7 	char *str2;
      8 } Class;
      9 
     10 typedef 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 
     24 int main(void) {
     25 	Class obj;
     26 	Class_Init(&obj, "Hello ", " World");
     27 }
     28 
     29