Calling addDecl on a CXXRecordDecl is not a trivial method but is actually inspecting the added
declarations to infer properties about the CXXRecordDecl. Whatever declaration we pass
to addDecl should be in its final state so we should first set all the properties of such a decl
and then call addDecl. If we do it the other way around like we do here then addDecl may
do incorrect decisions.
The only code that is currently after addDecl is changing whether the special members are
defaulted/trivial. I'm not sure if this actually fixes anything but it's more correct than what we
did before.