Commit 0442d08f authored by Yaxun (Sam) Liu's avatar Yaxun (Sam) Liu
Browse files

[clang][Sema] Improve diagnostics for auto return type

Currently when clang fails to deduce auto return type of a function,
it does not emit any notes about why it fails. This causes difficulty
for users to fix such errors.

Actually, clang already generates the information for emitting notes
about the failed deduction. There is a TODO for actually emitting
them.

This patch tries to implement the TODO. Basically it passes the
failed template specialization candidate set from the point of
specialization failure back to the point where the deduction starts.

It is not comprehensive but would be a start for further improvement.

Reviewed by: Richard Smith, Matheus Izvekov

Differential Revision: https://reviews.llvm.org/D150212

Fixes: SWDEV-354278
parent d5001e4f
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment