[PATCH] D133659: [Clang] P1169R4: static operator()

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 29 03:37:54 PDT 2022


cor3ntin added a comment.

I only left a few comments because I'm not familiar enough with that part of the code to be certain the changes are correct but overall it looks fine to me.



================
Comment at: clang/include/clang/Sema/Overload.h:524-526
+    /// StaticObjectArgumentConversion is a formal value to represent
+    /// the synthesized first argument of calls to static member functions
+    /// ([over.best.ics.general]p8).
----------------



================
Comment at: clang/lib/Sema/SemaOverload.cpp:7023
+    //
+    // This is a new overload rule that was introduced in C++23 to support static lambdas. We apply it
+    // retroactively because we want to support static lambdas as an extension and it doesn't hurt
----------------



================
Comment at: clang/lib/Sema/SemaOverload.cpp:7026
+    // previous code.
+    unsigned ConvIdx = PO == OverloadCandidateParamOrder::Reversed ? 1 : 0;
+    ImplicitConversionSequence ICS;
----------------
Can we move that outside of the scope to avoid duplication?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133659



More information about the cfe-commits mailing list