SuccessChanges

Summary

  1. [clang] Print 32 candidates on the first failure, with -fshow-overloads=best. (details)
Commit c90dac27e94ec354a3e8919556ac5bc89b62c731 by justin.lebar
[clang] Print 32 candidates on the first failure, with -fshow-overloads=best.

Previously, -fshow-overloads=best always showed 4 candidates.  The
problem is, when this isn't enough, you're kind of up a creek; the only
option available is to recompile with different flags.  This can be
quite expensive!

With this change, we try to strike a compromise.  The *first* error with
more than 4 candidates will show up to 32 candidates.  All further
errors continue to show only 4 candidates.

The hope is that this way, users will have *some chance* of making
forward progress, without facing unbounded amounts of error spam.

Differential Revision: https://reviews.llvm.org/D95754
The file was modifiedclang/lib/Sema/SemaOverload.cpp (diff)
The file was modifiedclang/test/SemaCXX/overloaded-builtin-operators.cpp (diff)
The file was modifiedclang/lib/Sema/Sema.cpp (diff)
The file was modifiedclang/test/SemaCXX/ambiguous-conversion-show-overload.cpp (diff)
The file was modifiedclang/include/clang/Basic/Diagnostic.h (diff)