================
@@ -1094,6 +1094,24 @@ static bool pathOnlyHandlesGslPointer(IndirectLocalPath 
&Path) {
   return false;
 }
 
+static bool
+isLifetimeboundInterleaveInGSL(llvm::ArrayRef<IndirectLocalPathEntry> PathRef) 
{
----------------
Xazax-hun wrote:

I am just wondering if this is the right approach to filter this problem out.

I think in the problematic code example `[[clang::lifetimebound]]` describes 
the lifetime of the returned reference, not the lifetime of the `gsl::pointer` 
annotated type. So, I think the mismatch is trying to apply the lifetimebound 
logic to the `gsl::pointer` in this particular example.

I think my point is, probably not all interleavings are bad, but here the 
`gsl::pointer` and the `lifetimebound` apply to different levels of indirection 
and I am wondering it that needs to be part of our filtering. 

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

Reply via email to