================
@@ -2531,3 +2531,98 @@ int *noreturn_dead_nested(bool cond, bool cond2, int 
*num) {
 }
 
 } // namespace conditional_operator_control_flow
+
----------------
usx95 wrote:

Can you also add a test for 

- Lifetime Suggestions

```cpp
std::function<void()> direct_return(const int& x) { // suggest lifetime bound 
here.
  return [&]() { (void)x; };
}
```

- Similarly detect UAF due to the inference of the above.
- Noescape: Same as above but `x` annotated as `noescape`. Should warn that 
noescape escapes.
- Dangling field: `std::function` as a field which is assigned a lambda 
capturing a local.
- Invalidation: function captures a reference to data inside a vector. the 
function is called after vector is modifed.

https://github.com/llvm/llvm-project/pull/191123
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to