================
@@ -16,12 +16,13 @@ void nonMember(
     const int &x2 [[clang::lifetime_capture_by(12345 + 12)]], // 
expected-error {{'lifetime_capture_by' attribute argument '12345 + 12' is not a 
known function parameter; must be a function parameter, 'this', 'global' or 
'unknown'}}
     const int &x3 [[clang::lifetime_capture_by(abcdefgh)]],   // 
expected-error {{'lifetime_capture_by' attribute argument 'abcdefgh' is not a 
known function parameter; must be a function parameter, 'this', 'global' or 
'unknown'}}
     const int &x4 [[clang::lifetime_capture_by("abcdefgh")]], // 
expected-error {{'lifetime_capture_by' attribute argument '"abcdefgh"' is not a 
known function parameter; must be a function parameter, 'this', 'global' or 
'unknown'}}
-    const int &x5 [[clang::lifetime_capture_by(this)]], // expected-error 
{{'lifetime_capture_by' argument references unavailable implicit 'this'}}
+    const int &x5 [[clang::lifetime_capture_by_this]], // expected-error 
{{'lifetime_capture_by_this' attribute requires an implicit object parameter}}
----------------
Xazax-hun wrote:

Do we have a test for the original error? I think we can emit both of them now. 

https://github.com/llvm/llvm-project/pull/196635
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to