================
@@ -186,4 +218,370 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr 
*E, bool CountInBytes,
   return false;
 }
 
+SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) {
----------------
delcypher wrote:

Yeah this isn't great. The whole function is essentially a workaround for the 
fact we don't have a good way to get `CountAttributedTypeLoc` from a 
`CountAttributedType`.

Given that I don't want to solve this problem right now I think simplest thing 
to do is just use the SourceRange from the count expression (which is the 
fallback for this function anyway). It does mean the SourceRange is slightly 
wrong (doesn't actually include the attribute text) but this isn't a deal 
breaker.

I can then tackle fixing this as part of the work  to fix the issue mentioned 
in this comment: 
https://github.com/llvm/llvm-project/pull/106321#discussion_r1735207309

Does that sound reasonable to you?

https://github.com/llvm/llvm-project/pull/106321
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to