This is an attempt to fix the first half of the problem in https://llvm.org/bugs/show_bug.cgi?id=19002
We {co,sh}ould be able to override a union initializer with an empty initializer but the code doesn't deal with that (I think). I'm still relatively new to Sema so there might be something I'm missing.
I double checked the generated AST after the fix and it seems correct:
[...]
`-VarDecl 0x807d35000 <line:21:3, line:27:3> line:21:11 v 'union a [2]' cinit `-InitListExpr 0x807d35268 <col:18, line:27:3> 'union a [2]' |-array filler | `-ImplicitValueInitExpr 0x807d35310 <<invalid sloc>> 'union a':'union a' `-InitListExpr 0x807d352b8 <line:26:11, col:14> 'union a':'union a' field Field 0x807caac90 'f' 'int'
[...]
I'll take a look at the FIXME and add the testcase reported in the PR if this sounds reasonable to you.