[clang] [clang] Support 'this' position for lifetimebound attribute (PR #115021)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 6 04:14:45 PST 2024


================
@@ -730,7 +731,9 @@ class YAMLConverter {
     }
   }
 
-  void convertParams(const ParamsSeq &Params, FunctionInfo &OutInfo) {
+  std::optional<ParamInfo> convertParams(const ParamsSeq &Params,
+                                         FunctionInfo &OutInfo) {
----------------
Xazax-hun wrote:

I think we can do that change when we need additional implicit parameters (or make it return a struct instead of a `std::optional<ParamInfo>`. One of the main reasons why I prefer returning an optional at the moment because it makes some of the call sites more concise, e.g., the checking for trying to specify `self` or `this` for a free function. 

https://github.com/llvm/llvm-project/pull/115021


More information about the cfe-commits mailing list