pskrgag wrote:

> I'd love to better understand what is the root cause for these weird 
> diagnostics when the functions are inlined

The problem was in `if (C.wasInlined)` logic in old version. So checker was not 
modeling all inlined functions. If we drop that check and just allow modeling 
inline functions, there will be a following problem:

```cpp
void close_outline(zx_handle_t handle ZX_ACQUIRE_HANDLE);

void close_inline(zx_handle_t handle ZX_ACQUIRE_HANDLE)  // <- Modeled close 
here. handle state is now "Closed"
{
   close_outline(handle);  // <- Use after close report
}
```

The same goes for `acquire` logic/

I guess, this kind of reports could be suppressed by custom bug visitor, but I 
thougth `evalCall` approach is more clean.

https://github.com/llvm/llvm-project/pull/111588
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to