* Fix#11720 FN functionConst when using base class members
* Format
* Add const
* Add const
* Improve const check for arguments, comments, tests
* Add test for #11573
* Add test for #11501
* Fix merge
* Add tests
* Use ASSERT_EQUALS
* Redundant check
* Fix#8433 FN unused variable not detected when there is lambda
* Format
* Fix tests
* Check lambda return
* Add test
* Undo, add test
* simpleMatch()
* Rename test
* Use library to get deallocation function
* Add suppressions
* Amend
* Remove suppression
* More getDeallocFuncInfo()
* Fix suppressions
* Fix suppression
* Fix 9392, but for destructors: out-of-line defaulted destructors skipped everything after
Context:
```
struct S {
~S();
};
S::~S() = default;
void g() {
int j;
++j;
}
```
Everything after `S::~S() = default;` was skipped, so the uninitialized variables in g() weren't found.
Out-of-line destructors are useful e.g. when you have a forward declared unique_ptr in the .h,
and `= default` the destructor in the .cpp, so only the cpp needs to know the header for destructing
your unique_ptr (like in the pImpl-idiom)
* Fix unit test, by correctly fixing 10789
Previous commit broke this test, but also provided the tools for a cleaner fix
* Document current behaviour
* Rewrite control flow
* Fix deleted functions, which skipped everything after
`a::b f() = delete` triggered the final else in SymbolDatabase::addNewFunction,
which sets tok to nullptr, effectively skipping to the end of the stream.
* Remove troublesome nullptr, which skips every analysis afterwards
It was introduced in 0746c241 to fix a memory leak.
But setting tok to nullptr, effectively skipping to the end, seems not needed.
Previous commits fixes prevented some cases where you could enter the `else`.
This commit is more of a fall back.
* fixup! Fix deleted functions, which skipped everything after
`a::b f() = delete` triggered the final else in SymbolDatabase::addNewFunction,
which sets tok to nullptr, effectively skipping to the end of the stream.
* fixup! Fix deleted functions, which skipped everything after
`a::b f() = delete` triggered the final else in SymbolDatabase::addNewFunction,
which sets tok to nullptr, effectively skipping to the end of the stream.
* Make it heard when encountering unexpected syntax/tokens
Co-authored-by: Gerbo Engels <gerbo.engels@ortec-finance.com>
* Fix#11019 FN memleak with redundant pointer op
* Style
* Fix#7705 FN: Memory leak not detected on struct member
* Fix FP memleak with function call, fix cppcheckError
* Fix FP memleak with array
* Fix FPs memleak with array and ptr to ptr
* Fix FP memleak with unknown ptr typedef
* Format
* Fix#11019 FN memleak with redundant pointer op
* Style
* Fix#7705 FN: Memory leak not detected on struct member
* Fix FP memleak with function call, fix cppcheckError
* Fix FP memleak with array
* Fix FPs memleak with array and ptr to ptr
* Fix#11019 FN memleak with redundant pointer op
* Style
* Fix#7705 FN: Memory leak not detected on struct member
* Fix FP memleak with function call, fix cppcheckError
* Fix FP memleak with array
* Fix#11019 FN memleak with redundant pointer op
* Style
* Fix#7705 FN: Memory leak not detected on struct member
* Fix FP memleak with function call, fix cppcheckError