Open kanje opened 2 years ago
Just have discovered https://github.com/llvm/llvm-project/issues/55219. So this probably is a duplicate.
@llvm/issue-subscribers-clang-static-analyzer
Yes, it looks like we're having trouble modeling the effects of named captures :(
Observation
Both
clang-tidy
andscan-build
warn about a potential memory leak in this code, which looks like a false positive:Expected Behaviour
No warning is issued for this code.
Additional Details
Environment: Fedora 35, clang 13.0.0, gcc 11.3.1.
Compile commands:
Note, the issue is reproducible with
-std=c++17
and-std=c++20
, but not with-std=c++14
.