https://github.com/usx95 requested changes to this pull request.
I do not think we can extend the current check to return types. In fact, we need to be quite permissive for these. This is the reason why we have `LifetimeAnnotatedOriginTypeCollector`. Currently this change will suggest lifetimebound on some constructors (with escaping fields) but adding that annotation would go against the current policy (see `LifetimeBoundCtor` test; `SWithUserDefinedCopyLikeOps` ctor is also correctly annotated). The purpose of the bug is to only reject clearly wrong types like builtin types `int getInt(const std::string &s [[clang::lifetimebound]]);` https://github.com/llvm/llvm-project/pull/203767 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
