[cfe-commits] r158691 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaOverload.cpp test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp test/Misc/integer-literal-printing.cpp test/SemaCXX/user-defined-conversions.cpp

Chris Lattner clattner at apple.com
Tue Jun 19 09:53:30 PDT 2012


On Jun 18, 2012, at 5:37 PM, Kaelyn Uhrain wrote:

> Author: rikka
> Date: Mon Jun 18 19:37:47 2012
> New Revision: 158691
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=158691&view=rev
> Log:
> Improve the error message when a function overload candidate is rejected
> because it expects a reference and receives a non-l-value.
> 
> For example, given:
> 
>  int foo(int &);
>  template<int x> void b() { foo(x); }
> 
> clang will now print "expects an l-value for 1st argument" instead of
> "no known conversion from 'int' to 'int &' for 1st argument". The change
> in wording (and associated code to detect the case) was prompted by
> comment #5 in PR3104, and should be the last bit of work needed for the
> bug.

Very nice!  Thank you!

-Chris



More information about the cfe-commits mailing list