[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 28 05:17:05 PDT 2024


================
@@ -3862,6 +3878,27 @@ CountAttributedType::CountAttributedType(
     DeclSlot[i] = CoupledDecls[i];
 }
 
+StringRef CountAttributedType::GetAttributeName(bool WithMacroPrefix) const {
----------------
Sirraide wrote:

Instead of doing this, it would be better to get a hold of the actual `Attr` and get the spelling from it. We don’t currently store the `Attr`s themselves in types, but the way this works for `AttributedType`s is that the `Attr*` is stored in the `AttributedTypeLoc`, so a better way to do this would probably be to just store it in and then get it from the `CountAttributedTypeLoc` instead.

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


More information about the cfe-commits mailing list