llvm-project/clang/test/CXX/drs
Aaron Puchert 6f84779674 [Sema] Improve notes for value category mismatch in overloading
When an overloaded member function has a ref-qualifier, like:

class X {
    void f() &&;
    void f(int) &;
};

we would print strange notes when the ref-qualifier doesn't fit the value
category:

X x;
x.f();
X().f(0);

would both print a note "no known conversion from 'X' to 'X' for object
argument" on their relevant overload instead of pointing out the
mismatch in value category.

At first I thought the solution is easy: just use the FailureKind member
of the BadConversionSequence struct. But it turns out that we weren't
properly setting this for function arguments. So I went through
TryReferenceInit to make sure we're doing that right, and found a number
of notes in the existing tests that improved as well.

Fixes PR47791.

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D90123
2020-11-15 18:05:11 +01:00
..
dr0xx.cpp Explain why the array bound is non-constant in VLA diagnostics. 2020-08-19 15:45:51 -07:00
dr1xx.cpp [Sema] Improve notes for value category mismatch in overloading 2020-11-15 18:05:11 +01:00
dr2xx.cpp Add -std=c++20 flag, replace C++2a with C++20 throughout the Clang 2020-02-18 16:16:37 -08:00
dr3xx.cpp [c++20] For P0732R2 / P1907R1: Basic frontend support for class types as 2020-10-21 13:21:41 -07:00
dr4xx.cpp Explain why the array bound is non-constant in VLA diagnostics. 2020-08-19 15:45:51 -07:00
dr5xx.cpp DR674, PR38883, PR40238: Qualified friend lookup should look for a 2019-01-07 06:00:46 +00:00
dr6xx.cpp [Sema] Improve notes for value category mismatch in overloading 2020-11-15 18:05:11 +01:00
dr7xx.cpp Undo removal of test for dr777. 2020-06-02 14:19:42 -07:00
dr9xx.cpp [clang][NFC] Mark CWG 974 and 1814 (default argument in a... 2020-06-13 13:49:07 +01:00
dr10xx.cpp
dr11xx.cpp
dr12xx.cpp DR1213: Ignore implicit conversions when determining if an operand of an 2018-06-27 20:29:32 +00:00
dr13xx.cpp Always deduce the lengths of contained parameter packs when deducing a 2020-01-06 17:24:29 -08:00
dr14xx.cpp [Sema] Improve notes for value category mismatch in overloading 2020-11-15 18:05:11 +01:00
dr15xx.cpp Fix parsing of enum-base to follow C++11 rules. 2020-05-08 19:32:00 -07:00
dr16xx.cpp When diagnosing an ambiguity, only note the candidates that contribute 2019-10-24 14:58:29 -07:00
dr17xx.cpp DR1753: Don't permit x.NS::~T() as a pseudo-destructor name. 2020-01-24 18:53:50 -08:00
dr18xx.cpp [clang][NFC] Mark CWG 974 and 1814 (default argument in a... 2020-06-13 13:49:07 +01:00
dr19xx.cpp Fix parsing of enum-base to follow C++11 rules. 2020-05-08 19:32:00 -07:00
dr20xx.cpp [clang] CWG 2082 and 2346: loosen the restrictions on parameters and local variables in default arguments. 2020-06-11 12:41:08 +01:00
dr21xx.cpp PR47954 / DR2126: permit temporary objects that are lifetime-extended by 2020-10-23 14:29:18 -07:00
dr22xx.cpp PR23029 / C++ DR2233: Allow expanded parameter packs to follow 2020-06-02 13:48:59 -07:00
dr23xx.cpp [Sema] Use the proper cast for a fixed bool enum. 2020-08-16 18:40:08 +02:00
dr118.cpp
dr158.cpp
dr412.cpp
dr1748.cpp