3f9e54b775
* Emit struct literal with list-initializer when language is Cxx * Update test results * Add test case - struct literal order * Memoize struct field names * Specify struct type at front of initializer
23 lines
354 B
C++
23 lines
354 B
C++
#include <cstdarg>
|
|
#include <cstdint>
|
|
#include <cstdlib>
|
|
#include <new>
|
|
|
|
struct PREFIXBar {
|
|
int32_t a;
|
|
};
|
|
|
|
struct PREFIXFoo {
|
|
int32_t a;
|
|
uint32_t b;
|
|
PREFIXBar bar;
|
|
};
|
|
|
|
static const PREFIXFoo PREFIXVAL = PREFIXFoo{ /* .a = */ 42, /* .b = */ 1337, /* .bar = */ PREFIXBar{ /* .a = */ 323 } };
|
|
|
|
extern "C" {
|
|
|
|
void root(PREFIXFoo x);
|
|
|
|
} // extern "C"
|