| Issue |
170417
|
| Summary |
Detect misuse of [[clang::noescape]] annotation
|
| Labels |
clang:temporal-safety
|
| Assignees |
|
| Reporter |
usx95
|
```
std::string_view foo(const std::string& in [[clang::noescape]]) {
return in;
}
```
e.g.: `in` escapes through `return` but is marked `noescape`.
After https://github.com/llvm/llvm-project/pull/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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs