================
@@ -624,34 +668,68 @@ class FactGenerator : public
ConstStmtVisitor<FactGenerator> {
if (CCE->getNumArgs() != 1)
return;
if (hasOrigin(CCE->getArg(0)))
- addAssignOriginFact(*CCE, *CCE->getArg(0));
+ addOriginFlowFact(*CCE, *CCE->getArg(0));
else
// This could be a new borrow.
handleFunctionCall(CCE, CCE->getConstructor(),
- {CCE->getArgs(), CCE->getNumArgs()});
+ {CCE->getArgs(), CCE->getNumArgs()},
+ /*IsGslConstruction=*/true);
+ }
+ static const FunctionDecl *
+ getDeclWithMergedLifetimeBoundAttrs(const FunctionDecl *FD) {
+ return FD != nullptr ? FD->getMostRecentDecl() : nullptr;
}
+ static const CXXMethodDecl *
+ getDeclWithMergedLifetimeBoundAttrs(const CXXMethodDecl *CMD) {
+ const FunctionDecl *FD = CMD;
+ return cast_if_present<CXXMethodDecl>(
+ getDeclWithMergedLifetimeBoundAttrs(FD));
+ }
+ static bool implicitObjectParamIsLifetimeBound(const FunctionDecl *FD) {
----------------
Xazax-hun wrote:
I believe we already have this function implemented somewhere else. Could we
call that instead of duplicating it?
https://github.com/llvm/llvm-project/pull/158489
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits