This is an archive of the discontinued LLVM Phabricator instance.

[Fix] Don't emit multiple diagnostics for the same error
ClosedPublic

Authored by george.burgess.iv on Oct 12 2015, 11:16 AM.

Details

Summary

Given code like the following (stolen from tests):

template <typename T1, typename T2> int f(T1 *, const T2 *);
template <typename T1, typename T2> int f(const T1 *, T2 *);
int (*p)(const int *, const int *) = f;

Clang will currently emit two "address of overloaded function f is ambiguous" errors for the same assignment (on line 3).

This patch makes us only emit one.

Diff Detail

Repository
rL LLVM

Event Timeline

george.burgess.iv retitled this revision from to [Fix] Don't emit multiple diagnostics for the same error.
george.burgess.iv updated this object.
george.burgess.iv added a reviewer: rsmith.
george.burgess.iv added a subscriber: cfe-commits.

Un-nested an if statement.

rsmith accepted this revision.Oct 12 2015, 11:31 AM
rsmith edited edge metadata.

LGTM, thanks!

This revision is now accepted and ready to land.Oct 12 2015, 11:31 AM
This revision was automatically updated to reflect the committed changes.