This patch fixes an assert that fired when diagnosing a failed template argument deduction attempt. The problem is that when deducing template arguments for a template specialization, if there are insufficient template arguments, we return Sema::TDK_TooFewArguments, which is meant to be used with call arguments, not template arguments and therefore confuses the diagnostic handling. This patch fixes the assert by instead returning Sema::TDK_MiscellaneousDeductionFailure.
This fixes a regression introduced in r274077, recorded by PR31043. Thanks!