================
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+#define __counted_by(f) __attribute__((counted_by(f)))
+
+int global_count;
+
+// An Objective-C method parameter's count is checked like a function
+// parameter's.
+@interface I
+// expected-error@+1{{count expression in function declaration may only
reference function parameters}}
+- (void)global:(int *__counted_by(global_count))buf;
----------------
delcypher wrote:
Interesting. I didn't know we were supporting Objective-C here. We should at
the very least have a positive test case here (i.e. the attribute is accepted
without errors).
https://github.com/llvm/llvm-project/pull/234941
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits