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. llvm-svn: 158691
Showing
- clang/include/clang/Basic/DiagnosticSemaKinds.td 11 additions, 0 deletionsclang/include/clang/Basic/DiagnosticSemaKinds.td
- clang/lib/Sema/SemaOverload.cpp 20 additions, 5 deletionsclang/lib/Sema/SemaOverload.cpp
- clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp 1 addition, 1 deletion...XX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp
- clang/test/Misc/integer-literal-printing.cpp 2 additions, 2 deletionsclang/test/Misc/integer-literal-printing.cpp
- clang/test/SemaCXX/user-defined-conversions.cpp 1 addition, 1 deletionclang/test/SemaCXX/user-defined-conversions.cpp
Loading
Please register or sign in to comment