Daniel Marjamäki
f36ca56e7d
Moved CheckStl::redundantCondition to normal checking
2019-03-09 07:53:49 +01:00
Daniel Marjamäki
f9fe6cc96a
STL: Removed auto_ptr checking.
2019-03-09 07:48:01 +01:00
Daniel Marjamäki
d7a645dcc3
Moved CheckStl::uselessCalls to normal checking
2019-03-09 07:37:08 +01:00
Daniel Marjamäki
45a0c2ebf5
Revert "Moved CheckStl::checkAutoPointer to normal checking"
...
This reverts commit 6dc9727ffd
.
2019-03-08 20:53:37 +01:00
Daniel Marjamäki
6dc9727ffd
Moved CheckStl::checkAutoPointer to normal checking
2019-03-08 20:41:28 +01:00
Daniel Marjamäki
95a20c0233
Moved CheckStl::string_c_str to normal checking
2019-03-08 20:39:43 +01:00
Daniel Marjamäki
fdf1d6fdee
Moved CheckStl::erase to normal checking
2019-03-08 20:36:40 +01:00
Daniel Marjamäki
fdfe39299c
Moved CheckStl::pushback to normal checking
2019-03-08 20:33:16 +01:00
Daniel Marjamäki
5fe48f3cd2
Moved CheckStl::mismatchingContainers to normal checking
2019-03-08 20:31:00 +01:00
Daniel Marjamäki
b91bb2e523
Moved CheckStl::iterators to normal checking
2019-03-08 20:28:28 +01:00
Daniel Marjamäki
8f2d70e61d
Move CheckStl::if_find to normal checking
2019-03-08 20:23:37 +01:00
Daniel Marjamäki
725abbfac3
Move CheckStl::missingComparison to normal checks
2019-03-08 20:19:40 +01:00
Daniel Marjamäki
bd7790fd8c
Update copyright year
2019-02-09 07:24:06 +01:00
Daniel Marjamäki
8b5f36670a
Introduce macro OVERRIDE for gcc-4.6 compatibility.
2019-01-12 07:37:42 +01:00
ivangalkin
5ddc6c64d7
CheckStl: add missing error ID iterators2 ( #1576 )
...
due to equal arguments...
* iterators1 (`CheckStl::iteratorsError(const Token*, const std::string&, const std::string&)`) and
* iterators2 (`CheckStl::iteratorsError(const Token*, const Token*, const std::string&, const std::string&)`)
... produced equal messages. Equal messages were filtered-out `CppCheck::reportErr(const ErrorLogger::ErrorMessage&)`.
So the error iterators2 disapeared from the error list.
2019-01-09 06:45:38 +01:00
Daniel Marjamäki
dd94bfede9
CheckStl: Improving checking of container access out of bounds
2018-11-28 19:27:28 +01:00
Daniel Marjamäki
4983a6a5dc
astyle formatting
2018-10-18 20:08:32 +02:00
Igor
0a9be3e734
Improve STL iterators checking ( #1380 )
...
* Improve STL interators checking
* Improve error messages for container iterators from different scopes
* Mini refactoring
* Replace hardcoded pattern to ValueType::Type::ITERATOR
* Error messages improvements, more tests and refactoring
* Refactoring after code review
* Put getting operand data into separate function
* Update getErrorMessages and iterator errors ids
* Refactoring
* Fix error
* Refactoring, early return implementation
* Delete redundant code
* Tiny changes in comments
2018-10-17 06:36:51 +02:00
orbitcowboy
a26ac4d266
Running astyle. There is no functional change intended.
2018-09-21 08:53:09 +02:00
Paul Fultz II
1e347f6cde
Initial check for recommending algorithms ( #1352 )
...
Add initial check for loop algorithms
2018-09-19 18:58:59 +02:00
Daniel Marjamäki
772939476d
Remove inconclusive warnings about reading empty stl container. We have better ValueFlow-based checking.
2018-09-09 11:25:04 +02:00
Matthias Krüger
a9ae897f8c
checkstl: fix inconsistent-missing-override warning reported by clang.
...
Warning was:
lib/checkstl.h:57:18: warning: 'runChecks' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
virtual void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) {
^
lib/check.h:67:18: note: overridden virtual function is here
virtual void runChecks(const Tokenizer *, const Settings *, ErrorLogger *) {
^
2018-08-11 21:33:44 +02:00
Daniel Marjamäki
1f427eda8f
CheckStl: rewrite and refactor out of bounds checker
2018-08-11 11:40:48 +02:00
Daniel Marjamäki
81f54f7094
Fixed #8681 (ValueFlow: Container size)
2018-08-10 11:29:16 +02:00
Paul Fultz II
ed197f235a
Fix issue 4693: Diagnostic when using the same iterators to an algorithm ( #1326 )
...
* Fix issue 4693: Diagnostic when using the same iterators to an algorithm
* Update classinfo
2018-08-05 09:10:54 +02:00
Paul Fultz II
0d35a96594
Improve checking of mismatch iterators ( #1293 )
2018-07-26 22:00:48 +02:00
Sebastian
0b65a52224
Add some missing errors to --errorlist output. ( #1292 )
...
Partly fixes https://trac.cppcheck.net/ticket/7772 .
2018-06-20 10:43:13 +02:00
IOBYTE
ce50df8047
Fix override warnings. ( #1234 )
2018-05-15 16:37:40 +02:00
Daniel Marjamäki
c4caee6b18
Updated copyright year
2018-01-14 15:37:52 +01:00
amai2012
b17807c568
#6572 False positive eraseDereference - in iterator class - flag error inconclusive if iterator is not STL type
2018-01-10 09:37:21 +01:00
Daniel Marjamäki
2679b576c2
Fixed #1693 (false negative: std::vector, negative index)
2017-08-22 11:04:02 +02:00
Ayaz Salikhov
b8cd7dbb5c
Use nullptr instead of 0 or NULL ( #936 )
2017-08-09 20:00:26 +02:00
Daniel Marjamäki
abf525e46d
Fix Cppcheck warning
2017-07-29 11:58:00 +02:00
Ayaz Salikhov
28aa939d69
iwyu - include what you use
2017-05-27 04:33:47 +02:00
Daniel Marjamäki
633ed23c0d
Fix Cppcheck warnings about mismatching function argument names
2017-04-01 09:31:27 +02:00
Daniel Marjamäki
c8667096e0
Fixed #7658 (False positive: Same iterator is used with different containers)
2016-08-14 10:49:48 +02:00
amai2012
eba1b0881d
Minor refactoring: use nullptr (instead of 0/NULL), change signature of Tokenizer::createTokens
2016-05-07 16:30:54 +02:00
Lauri Nurmi
996c9244d8
Update copyright year to 2007-2016.
2016-01-01 15:34:45 +02:00
PKEuS
c0e33e20b4
Reimplemented CheckStl::readingEmptyStlContainer() based on Libraries
2015-11-20 15:53:14 +01:00
PKEuS
53b2eca983
Reimplemented CheckStl::stlBoundaries() based on Libraries; Added support for iterators to libraries
2015-11-20 15:53:14 +01:00
Daniel Marjamäki
0f9d90d2be
Changed Copyrights. Removed my name.
2015-11-18 20:04:50 +01:00
PKEuS
795e5de903
Refactorization: Cleaned up after ExecutionPath removal
2015-07-23 20:37:09 +02:00
Daniel Marjamäki
3dbf290220
Refactor CheckStl::erase so it doesn't use ExecutionPath
2015-07-23 18:53:31 +02:00
PKEuS
4cbbd44d49
Fixed false positive #6663 : Better support for loops in CheckStl::readingEmptyStlContainer()
2015-05-02 14:09:48 +02:00
Jakub Melka
a49efb13f6
Added auto_ptr checking for malloc
2015-03-19 06:41:54 +01:00
Daniel Marjamäki
ff11ba9847
Updated copyright year to 2015
2015-01-03 12:14:58 +01:00
Daniel Marjamäki
051d42ae6b
astyle formatting
2014-11-20 14:20:09 +01:00
orbitcowboy
f5d804f71a
running astyle
2014-11-20 10:13:03 +01:00
Daniel Marjamäki
fbc6323a9b
doc: changed --doc output to Markdown syntax
2014-09-30 14:56:12 +02:00
PKEuS
8f79dc3ff8
Cleaned up includes and forward declarations in checkers:
...
- Removed definitely unnecessary forward declarations (e.g. "class Token"; token.h is already included by check.h, so a definition is unnecessary)
- Removed unused includes
2014-05-24 12:50:03 +02:00