rsmith added inline comments.

================
Comment at: clang/lib/Sema/SemaStmt.cpp:3469
+    if (Res == OR_Success || Res == OR_Deleted) {
+      // Promote "AsRvalue" to the heap, since we now need
+      // expression node to persist.
----------------
Looks like you lost a word in this comment.


================
Comment at: clang/lib/Sema/SemaStmt.cpp:3478-3481
+        // Check that overload resolution selected a conversion operator
+        // taking an rvalue reference.
+        if (cast<CXXMethodDecl>(FD)->getRefQualifier() != RQ_RValue)
+          break;
----------------
Is the removal of this check for an rvalue ref qualifier a bugfix? If so, 
please add a test. I suppose it would look something like this:
```
struct B;
struct A { A(B&) = delete; };
struct B { operator A(); };
A f() { B b; return b; }
```
... which would be ambiguous if we don't implicitly convert to xvalue, but if 
we do, it selects a conversion function that is not rvalue-ref-qualified.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104500/new/

https://reviews.llvm.org/D104500

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to