if a function is defined out-of-line and marked as deleted/ defaulted [cxx11],
it is handled by Parser::ParseFunctionDefinition( Body = 0). This function calls
Actions.ActOnFinishFunctionBody() which in-turn calls DiagnoseUnusedParameters()
and DiagnoseSizeOfParametersAndReturnValue(). After this, the function attributes
are set to deleted/ defaulted.
For deleted/ defaulted function, as they do not have body to diagnosed against,
DiagnoseXXX calls does not make much sense. I have added a patch with this check
before calling DiagnoseXXX functions.
I have tried other options like, first mark functions as deleted/ defaulted and
then call ActOnFinishFunctionBody() and check if function is marked before calling
DiagnoseXXX functions but it has its own side effects.
Please let me know if this patch is ok.
This comment should be higher level, explaining why it's doing this, not how it's doing it. The code itself is fairly obvious. For example: