================
@@ -553,6 +553,12 @@ def LifetimeSafetySuggestions
Lifetime annotation suggestions for function parameters that should be
marked [[clang::lifetimebound]] based on lifetime analysis.
}];
}
+def LifetimeSafetyNoescape
+ : DiagGroup<"experimental-lifetime-safety-noescape"> {
+ code Documentation = [{
+ Detects misuse of [[clang::noescape]] annotation where the parameter
escapes through return.
----------------
Xazax-hun wrote:
In the future, I think we will want to warn for escapes of other forms, like
assigning to a member variable or to a global. I am OK with the documentation
reflecting the current state rather than the future aspirations but wanted to
call this out just in case anyone has strong feelings about this.
https://github.com/llvm/llvm-project/pull/177260
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits