-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Open
Labels
clang:temporal-safetyIssue/FR relating to the lifetime analysis in Clang (-Wdangling, -Wreturn-local-addr)Issue/FR relating to the lifetime analysis in Clang (-Wdangling, -Wreturn-local-addr)
Description
std::string_view foo(const std::string& in [[clang::noescape]]) {
return in;
}e.g.: in escapes through return but is marked noescape.
After #169767, the placeholder loans can help detect when parameters escape. Currently we suggest to add lifetimebound to such params. But when the param is annotated with clang::noescape, we should diagnose a misuse.
frederick-vs-ja
Metadata
Metadata
Assignees
Labels
clang:temporal-safetyIssue/FR relating to the lifetime analysis in Clang (-Wdangling, -Wreturn-local-addr)Issue/FR relating to the lifetime analysis in Clang (-Wdangling, -Wreturn-local-addr)
Type
Projects
Status
No status