Fix a bug I found while preparing my devmtg talk: When passing NULL to a
authorMatt Beaumont-Gay <matthewbg@google.com>
Thu, 8 Nov 2012 20:50:02 +0000 (20:50 +0000)
committerMatt Beaumont-Gay <matthewbg@google.com>
Thu, 8 Nov 2012 20:50:02 +0000 (20:50 +0000)
commit641bd89d6b5e7378fdcc989e09ee1fcf6edf9f70
treec2bfa34ec8a9e88b152bad60924a9f57304b1bde
parent43ab4ef9bae9a99a1e64c20eabcae7e850c2e6b3
Fix a bug I found while preparing my devmtg talk: When passing NULL to a
function that takes a const Foo&, where Foo is convertible from a large number
of pointer types, we print ALL the overloads, no matter the setting of
-fshow-overloads.

There is potential follow-on work in unifying the "print candidates, but not
too many" logic between OverloadCandidateSet::NoteCandidates and
ImplicitConversionSequence::DiagnoseAmbiguousConversion.

llvm-svn: 167596
clang/lib/Sema/SemaOverload.cpp
clang/test/SemaCXX/ambiguous-conversion-show-overload.cpp [new file with mode: 0644]