// RUN: %clang_cc1 -fsyntax-only -verify %s
typedef union TU ;
void ; // expected-note{{passing argument to parameter here}}
void
/* Test ability to redeclare a function taking a transparent_union arg
with various compatible and incompatible argument types. */
void ;
void
void ;
void
void ;
void
void ; // expected-note{{previous declaration is here}}
void // expected-error{{conflicting types}}
void ; // expected-note{{previous declaration is here}}
void // expected-error{{conflicting types}}
void ; // expected-note{{previous declaration is here}}
void // expected-error{{conflicting types}}
void ; // expected-note{{previous declaration is here}}
void // expected-error{{conflicting types}}
/* Test redeclaring a function taking a transparent_union arg more than twice.
Merging different declarations depends on their order, vary order too. */
void
void ; // expected-note{{previous declaration is here}}
void ; // expected-error{{conflicting types}}
void ;
void // expected-note{{previous definition is here}}
void ; // expected-error{{conflicting types}}
void ; // expected-note{{previous declaration is here}}
void ; // expected-error{{conflicting types}}
void
/* Test calling redeclared function taking a transparent_union arg. */
void ;
void // expected-note{{passing argument to parameter 'i' here}}
void
/* FIXME: we'd like to just use an "int" here and align it differently
from the normal "int", but if we do so we lose the alignment
information from the typedef within the compiler. */
typedef struct aligned_struct8;
typedef struct aligned_struct4;
typedef union TU1 ;
typedef union TU1b ;
typedef union TU2 ;
typedef union TU2b;
typedef union TU3 ;
typedef union TU4 ; // expected-warning{{field}}
typedef int int4 ;
typedef union TU5 ;
;
;
; // expected-error {{field has incomplete type 'void'}}
; // expected-error {{flexible array member 'b' in a union is not allowed}}
// expected-note@+1 2 {{forward declaration of 'struct stb'}}
; // expected-error {{field has incomplete type 'struct stb'}}
; // expected-error {{field has incomplete type 'struct stb'}}
typedef union TU6;
void ;
void
void