Open kieselnb opened 1 year ago
@llvm/issue-subscribers-clang-static-analyzer
Ohhh interesting. This is why "check in pre-call, model in post-call" is an important rule to follow. I think you're right, if the operator is inlined, we shouldn't model it manually.
Still happens with clang-tidy-17 and clang-tidy-18, with Qt 6.7.0
Seems related to https://github.com/llvm/llvm-project/issues/62985
Linting a codebase that uses Qt 6 with clang-tidy 15 (have tested 15.0.0 and 15.0.3) results in a false positive within
QWeakPointer
(triggered by usage ofQPointer
):ExternalRefCountData::operator delete(void*)
is incorrectly treated as a proper::operator delete(void*)
, and the memory is marked as freed. Parsing then continues down the stack and sees the true call of::operator delete(void*)
, triggering the error since clang-tidy thinks the memory has already been freed.LLVM 12.0.1 and 14.0.6 did not exhibit this behavior.
CMakeLists.txt:
main.cpp: