Page MenuHomePhabricator

[Sema] Fix assert on valid during template argument deduction

Authored by erik.pilkington on Nov 19 2016, 9:43 PM.



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!

Diff Detail

Event Timeline

erik.pilkington retitled this revision from to [Sema] Fix assert on valid during template argument deduction.
erik.pilkington updated this object.
erik.pilkington added a reviewer: rsmith.
erik.pilkington added a subscriber: cfe-commits.
erik.pilkington abandoned this revision.Jan 4 2017, 6:48 PM

@rsmith fixed this in r291064.

rsmith edited edge metadata.Jan 4 2017, 7:08 PM

Sorry I missed this =( Thanks for the fix!