================
@@ -23,4 +23,17 @@ void nb4() [[clang::nonblocking]] {
        }
        @catch (...) { // expected-warning {{function with 'nonblocking' 
attribute must not throw or catch exceptions}}
        }
+       @finally { // expected-warning {{function with 'nonblocking' attribute 
must not throw or catch exceptions}}
+       }
 }
+
+@class Lock;
+extern Lock *someLock;
+
+void nb5() [[clang::nonblocking]] {
+       @autoreleasepool { // expected-warning {{function with 'nonblocking' 
attribute must not access ObjC methods or properties}}
+       }
+
+       @synchronized(someLock) { // expected-warning {{function with 
'nonblocking' attribute must not access ObjC methods or properties}}
+       }
+}
----------------
Sirraide wrote:

nit: Missing newline

https://github.com/llvm/llvm-project/pull/112148
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to