* 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
* fixed some CLion "Unused global declaration" warnings
* fixed some CLion "Not implemented function" warnings
* fixed some CLion "Unused struct" warnings
* added TODO
* removed unused parameter reported by CLion
* fixed some CLion "Unused macro" warnings
* fixed some CLion "Condition is always true" warnings and a CLion "The value is never used" warning
Use case where it gave an issue:
using customComparator = decltype([] (const X& lhs, const X& rhs) { return lhs.CompareTo(rhs); });
std::map<X, int, costomComparator> m;
Co-authored-by: Gerbo Engels <gerbo.engels@ortec-finance.com>
* Optimization: Use Token::eIncDecOp instead of expensive Token::Match calls
Merged from LCppC.
* Small Optimizations: - Moved a std::set that is only need during initialization of SymbolDatabase to function scope - Use std::vector instead of std::list
Merged from LCppC.
* Optimization: Refactorized various Token::Match calls and surrounding conditions
Merged from LCppC.
* Refactorization: Cleanup usage of std::multimap
Merged from LCppC.
* Fix 11057: FP danglingTemporaryLifetime with reference member
* Add test
* Format
* Use ast for number of arguments
* Get number of arguments using ast
* Skip aggregate constructor when there are too many arguments
* Format
* fixed functionConst findings and enabled it in selfcheck
* fixed functionStatic findings and enabled it in selfcheck
* .travis_suppressions: adjusted comment
* testimportproject.cpp: added missing asserts
Follow up to 0093452bed.
Give the proper end to getVariableList, since it might not be bodyEnd.
Before that, getVariableList would add the same variables in several
unrelated scopes, and all kind of false positive would follow.
For instance, with the case I added in the unit-tests, I had:
```
../code.cpp:15:18: warning: The struct 'is_A' defines member variable with name 'foo' also defined in its parent struct 'is_A_impl'. [duplInheritedMember]
static const int foo = 8;
^
../code.cpp:15:18: note: Parent variable 'is_A_impl::foo'
static const int foo = 8;
^
../code.cpp:15:18: note: Derived variable 'is_A::foo'
static const int foo = 8;
^
../code.cpp:15:18: style: struct member 'has_A::foo' is never used. [unusedStructMember]
static const int foo = 8;
^
../code.cpp:15:18: style: struct member 'is_A::foo' is never used. [unusedStructMember]
static const int foo = 8;
^
```