[clang] [Bounds-Safety] Add sized_by, counted_by_or_null & sized_by_or_null (PR #93231)

Henrik G. Olsson via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 9 13:49:27 PDT 2024


================
@@ -8320,6 +8320,15 @@ static const RecordDecl *GetEnclosingNamedOrTopAnonRecord(const FieldDecl *FD) {
   return RD;
 }
 
+static CountAttributedType::DynamicCountPointerKind
+getCountAttrKind(bool CountInBytes, bool OrNull) {
----------------
hnrklssn wrote:

I guess it could be a static method. It can't be an instance method since it's used before the object is constructed. Since it's only used in one place I thought it'd improve readability to keep it close to the call site.

https://github.com/llvm/llvm-project/pull/93231


More information about the cfe-commits mailing list