================
@@ -172,6 +172,29 @@ Without ``[[clang::lifetimebound]]`` on ``getView()``, the
analysis would not
know that the value returned by ``getView()`` depends on the temporary
``MyOwner`` object, and it would not be able to diagnose the dangling ``sv``.
+The analysis also tracks record types returned from functions and constructors
+with ``[[clang::lifetimebound]]`` annotated parameters:
+
+.. code-block:: c++
+
+ #include <string>
+
+ struct S {
+ S(const std::string &s [[clang::lifetimebound]]);
+ };
----------------
usx95 wrote:
Let's rename this struct to `StringView` to be descriptive.
https://github.com/llvm/llvm-project/pull/189508
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits