================ @@ -0,0 +1,54 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +#define __counted_by(f) __attribute__((counted_by(f))) + +struct size_unknown; + +struct at_pointer { + int count; + struct size_unknown *__counted_by(count) buf; // expected-error{{'counted_by' cannot be applied to an sized type}} ---------------- bwendling wrote:
This should be fine, because `count` is declared before use—unless I'm getting type attributes confused with field attributes.. Also, there's a grammar-o in the message: `to _an_ sized type`. https://github.com/llvm/llvm-project/pull/87596 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits