[PATCH] D133066: fix a typo in comment of AddConversionCandidate

zhouyizhou via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 31 16:02:23 PDT 2022


zhouyizhou created this revision.
zhouyizhou added reviewers: MikeStump, riccibruno, rsmith.
Herald added a project: All.
zhouyizhou requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Hi 
I think the comment above the condition expression ICS.Standard.First == ICK_Lvalue_To_Rvalue should be:

//    In the second case, if the reference is an rvalue reference and                 
//    the first standard conversion sequence of the user-defined                      
//    conversion sequence includes an lvalue-to-rvalue conversion, the                
 //    program is ill-formed.

Many thanks
Zhouyi Zhou <zhouzhouyi at gmail.com>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133066

Files:
  clang/lib/Sema/SemaOverload.cpp


Index: clang/lib/Sema/SemaOverload.cpp
===================================================================
--- clang/lib/Sema/SemaOverload.cpp
+++ clang/lib/Sema/SemaOverload.cpp
@@ -7495,7 +7495,7 @@
 
     // C++0x [dcl.init.ref]p5:
     //    In the second case, if the reference is an rvalue reference and
-    //    the second standard conversion sequence of the user-defined
+    //    the first standard conversion sequence of the user-defined
     //    conversion sequence includes an lvalue-to-rvalue conversion, the
     //    program is ill-formed.
     if (ToType->isRValueReferenceType() &&


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133066.457120.patch
Type: text/x-patch
Size: 605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220831/7c5ba833/attachment.bin>


More information about the cfe-commits mailing list