rapidsna added inline comments.

================
Comment at: clang/include/clang/Basic/AttrDocs.td:7209
+    /* ... */
+    struct bar *fam[] __attribute__((counted_by(num_fam_elements)));
+  };
----------------
I don't think it's necessary for this patch but for [[ 
https://discourse.llvm.org/t/rfc-enforcing-bounds-safety-in-c-fbounds-safety/70854/113?u=rapidsna
 | -fbounds-safety ]], we'd eventually turn this into a type attribute that we 
will use to create a sugared type or qualified type. And we'd make the 
attribute work for **both** this position and inside the array bracket (e.g., 
`fam[__counted_by(n)]`). Would it work for you?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148381/new/

https://reviews.llvm.org/D148381

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to