[cfe-commits] [PATCH] Limit the number of overload candidates printed (issue1591041)
dgregor at apple.com
Tue Jun 8 11:14:09 PDT 2010
On Jun 8, 2010, at 11:10 AM, John McCall wrote:
> On Jun 8, 2010, at 7:49 AM, Douglas Gregor wrote:
>> On Jun 7, 2010, at 6:03 PM, jyasskin at gmail.com wrote:
>>> Reviewers: cfe-commits_cs.uiuc.edu,
>>> Please take a look. If you prefer reviewing diffs, they're behind the
>>> "Download raw patch set" link.
>>> When there are lots of operator<<s, clang produces significantly worse
>>> diagnostics than gcc, simply because of the size of the output. This
>>> patch limits clang to 4 overload candidates, with the ability to show
>>> the rest by passing -fshow-all-overloads, as a first cut. We'll want to
>>> refine that later as examples of bad behavior come up.
>> Unless we can be fairly sure that the "right" operator<< is in those first 4 overload candidates, I don't think this is a good idea. Unlike with suppressing inner template/macro instantiation histories, this change is likely to suppress important information.
> One idea would be to cut off after a substantial drop in match quality. We'd need a lot of extra work on the match-quality comparator, though; for example, it currently categorically ranks functions with arity mismatches after functions with matching argument counts. Obviously that's bad if the user just forgot an argument.
Yeah, this is what I'm really looking for. We want heuristics that show us the (few) likely candidates, but not the unlikely candidates.
More information about the cfe-commits