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

Dan Liew via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 7 10:24:34 PST 2025


================
@@ -3907,6 +3923,31 @@ CountAttributedType::CountAttributedType(
     DeclSlot[i] = CoupledDecls[i];
 }
 
+StringRef CountAttributedType::getAttributeName(bool WithMacroPrefix) const {
+// TODO: This method isn't really ideal because it doesn't return the spelling
----------------
delcypher wrote:

In this context AFAICT we do not have access to the attribute. All we have is the `CountAttributedType` and we have no easy way to find the corresponding `Attr` object from this type. This is what #113585 tracks fixing. 

There's a related comment about this in this review [here](https://github.com/llvm/llvm-project/pull/106321#discussion_r1815994027).

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


More information about the cfe-commits mailing list