pskrgag wrote:

I am sorry, looks like I found another regression:

```cpp

#include <memory>

struct Foo {
  std::unique_ptr<int> ptr;
  int *raw;

  Foo() : ptr(std::make_unique<int>(1)), raw(new int) {}
};

void add(Foo foo) {}

int main(int argc, const char **argv) {
  add(Foo());
  return 0;
}
```

With your patch applied `raw` leak is not reported, however current CSA finds 
it: https://godbolt.org/z/569x11e7a.

I didn't trace why it happens, will be able to come back tomorrow.

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

Reply via email to