Default argument constructor with brace initialized array miscompilation

https://godbolt.org/g/sm5tMo

For code below there are missing destructor calls - make_a() is called 5 times but ~A() only once.

struct A {
    ~A();
};
A make_a();
struct B {
    B(A a = make_a()) {};
};

int main() {
    B b[5] = {};
}

Interesting, thanks for telling us about it. It certainly looks dodgy
to me so I've created a bug report: http://llvm.org/PR33040. Not
really my area, but I'll try to actually take a look at it today.

Tim.

This was already filed as PR22877; I fixed it last week.

Oh bother, thanks. I thought I'd checked it against today's trunk but
it seems my build directory had gone wonky and I was only building
LLVM.

Tim.