================
@@ -712,6 +712,12 @@ void FactsGenerator::handleFunctionCall(const Expr *Call,
CallList->getOuterOriginID(), ArgList->getOuterOriginID(),
KillSrc));
KillSrc = false;
+ } else if (IsArgLifetimeBound(I)) {
+ // A lifetimebound argument may affect the result at every origin
level,
+ // so we propagate the whole OriginList instead of only the outermost
+ // origin.
+ flow(CallList, ArgList, KillSrc);
----------------
usx95 wrote:
I am not sure we want to flow all the origins. The origin shape can differ and
this can cause the analysis to crash atm.
Since `lifetimebound` is not expressive enough for inner lifetimes, I think it
makes sense to only flow outer origins.
Let's also add a test where this crashes currently.
```cpp
class [[gsl::Pointer]] Pointer {
Pointer(int**x [[clang::lifetimebound]]);
}
```
https://github.com/llvm/llvm-project/pull/189907
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits