[clang] [LifetimeSafety] Add report on misuse of clang::noescape (PR #177260)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 25 12:54:09 PST 2026
================
@@ -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<"lifetime-safety-noescape"> {
+ code Documentation = [{
+ Detects misuse of [[clang::noescape]] annotation where the parameter escapes through return.
----------------
usx95 wrote:
Suggestion to not emphasize return: `Detects misuse of [[clang::noescape]] annotation where the parameter escapes (for example, through return).`
https://github.com/llvm/llvm-project/pull/177260
More information about the cfe-commits
mailing list