llvm-project/clang/test/CXX/drs
Richard Smith f041e9ad70 CWG2352: Allow qualification conversions during reference binding.
The language wording change forgot to update overload resolution to rank
implicit conversion sequences based on qualification conversions in
reference bindings. The anticipated resolution for that oversight is
implemented here -- we order candidates based on qualification
conversion, not only on top-level cv-qualifiers, including ranking
reference bindings against non-reference bindings if they differ in
non-top-level qualification conversions.

For OpenCL/C++, this allows reference binding between pointers with
differing (nested) address spaces. This makes the behavior of reference
binding consistent with that of implicit pointer conversions, as is the
purpose of this change, but that pre-existing behavior for pointer
conversions is itself probably not correct. In any case, it's now
consistently the same behavior and implemented in only one place.

This reinstates commit de21704ba9,
reverted in commit d8018233d1, with
workarounds for some overload resolution ordering problems introduced by
CWG2352.
2020-01-09 18:24:06 -08:00
..
dr0xx.cpp Add missing diagnostic for explicit instantiation declarations naming 2019-04-26 01:51:07 +00:00
dr1xx.cpp When diagnosing the lack of a viable conversion function, also list 2020-01-09 15:15:02 -08:00
dr2xx.cpp [Sema] SequenceChecker: C++17 sequencing rules for built-in operators <<, >>, .*, ->*, =, op= 2019-12-22 12:41:14 +00:00
dr3xx.cpp DR330: when determining whether a cast casts away constness, consider 2018-07-18 20:13:36 +00:00
dr4xx.cpp CWG2352: Allow qualification conversions during reference binding. 2020-01-09 18:24:06 -08:00
dr5xx.cpp DR674, PR38883, PR40238: Qualified friend lookup should look for a 2019-01-07 06:00:46 +00:00
dr6xx.cpp [Sema] SequenceChecker: C++17 sequencing rules for built-in operators <<, >>, .*, ->*, =, op= 2019-12-22 12:41:14 +00:00
dr7xx.cpp [MS] Consder constexpr globals to be inline, as in C++17 2019-09-11 18:09:10 +00:00
dr9xx.cpp
dr10xx.cpp When substituting previously-checked template arguments into a template 2018-03-08 01:07:33 +00:00
dr11xx.cpp DR1113: anonymous namespaces formally give their contents internal linkage. 2017-09-22 22:21:44 +00:00
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 [c++20] P1331R2: Allow transient use of uninitialized objects in 2019-09-18 17:37:44 +00:00
dr15xx.cpp When diagnosing the lack of a viable conversion function, also list 2020-01-09 15:15:02 -08:00
dr16xx.cpp When diagnosing an ambiguity, only note the candidates that contribute 2019-10-24 14:58:29 -07:00
dr17xx.cpp P1286R2: Remove restriction that the exception specification of a 2019-05-06 05:04:56 +00:00
dr18xx.cpp [c++20] P1064R0: Allow virtual function calls in constant expression 2019-05-13 23:35:21 +00:00
dr19xx.cpp Refactor constant evaluation of typeid(T) to track a symbolic type_info 2019-05-17 07:06:46 +00:00
dr20xx.cpp C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue conversion applied to a member access or similar not-quite-trivial lvalue expression. 2019-06-14 17:46:37 +00:00
dr21xx.cpp PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type 2019-06-14 17:46:38 +00:00
dr22xx.cpp Fix handling of class member access into a vector type. 2019-08-14 22:57:50 +00:00
dr23xx.cpp CWG2352: Allow qualification conversions during reference binding. 2020-01-09 18:24:06 -08:00
dr118.cpp
dr158.cpp
dr412.cpp
dr1748.cpp