Commit Graph

364 Commits

Author SHA1 Message Date
Daniel Marjamäki bcdd58de0b astyle formatting
[ci skip]
2018-08-05 10:48:28 +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
Daniel Marjamäki 0a66f5c4f9 astyle formatting
[ci skip]
2018-07-26 22:24:00 +02:00
Daniel Marjamäki e2a4b1706c Refactoring CheckStl::mismatchingContainers; Use AST 2018-07-26 22:23:37 +02:00
Daniel Marjamäki 86721f5b91 small refactorings 2018-07-26 22:08:05 +02:00
Daniel Marjamäki d471c27502 astyle formatting
[ci skip]
2018-07-26 22:03:49 +02:00
Paul Fultz II 0d35a96594 Improve checking of mismatch iterators (#1293) 2018-07-26 22:00:48 +02:00
Daniel Marjamäki e552737028 Refactoring: Use range for loop 2018-07-13 16:46:29 +02:00
Daniel Marjamäki b398398dec Fixed #8360 (false positive "Ineffective call of function 'empty()'") 2018-07-10 22:58:02 +02:00
Daniel Marjamäki 79ffe1d4fc Rename _tokenizer, _settings, _errorLogger 2018-06-16 16:10:28 +02:00
Daniel Marjamäki ca8e19c96d SymbolDatabase: Refactor SymbolDatabase: variable list 2018-04-28 09:38:33 +02:00
Daniel Marjamäki f336c2efe7 Refactoring; Renamed Scope::classStart and Scope::classEnd 2018-04-27 22:36:30 +02:00
amai2012 55983e2a0b #8509 Uniform initialization ignored for iterator 2018-04-26 08:57:25 +02:00
Daniel Marjamäki e95ff8c7b6 Avoiding emplace 2018-04-14 19:24:35 +02:00
PKEuS d2146844dd Refactorizations:
- Replace several push_back-calls by emplace_back
- Replace some x = x.substr(0, y) calls by x.erase(y)
2018-04-11 09:44:35 +02:00
PKEuS b15cc3f236 Refactorization: Replace several push_back-sequences by initializer lists 2018-04-09 09:54:39 +02:00
Daniel Marjamäki a0906140a6 Suppressions: New extensible Suppressions xml format that allow more attributes. To start with it also allows symbolName. 2018-04-09 06:43:48 +02:00
PKEuS e2002db78d Replaced make_container by C++11 initializer lists 2018-04-08 23:03:44 +02:00
jrp2014 b6504c70ca Improve constness 2018-04-04 21:51:31 +02:00
Daniel Marjamäki c4caee6b18 Updated copyright year 2018-01-14 15:37:52 +01:00
amai2012 2ef7c35cfd Function isIterator() did not to set returned parameter always 2018-01-12 09:36:14 +01:00
Daniel Marjamäki 323e9ab509 astyle formatting
[ci skip]
2018-01-11 09:31:16 +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 83b87b54b4 Fixed #8191 (False positive iterators regression) 2018-01-06 22:25:13 +01:00
Daniel Marjamäki 61767d4932 Fixed #8125 (incorrect error iterators) 2018-01-06 16:08:12 +01:00
Oleksandr Redko a8700f5622 Remove redundant parts of conditional expressions (#988)
All issues were found with PVS-Studio:
V560 A part of conditional expression is always true: tok. astutils.cpp 407
V560 A part of conditional expression is always true: size > 0. checkbufferoverrun.cpp 709
V547 Expression 'secondTrue' is always true. checkcondition.cpp 1013
V547 Expression 'firstTrue' is always true. checkcondition.cpp 1020
V560 A part of conditional expression is always true: !scan. checkio.cpp 1036
V560 A part of conditional expression is always true: scope->function. checknullpointer.cpp 395
V560 A part of conditional expression is always true: tok2. checkstl.cpp 268
V560 A part of conditional expression is always true: par. tokenize.cpp 9440
V547 Expression '!erased' is always true. symboldatabase.cpp 3990
2017-11-03 10:39:57 +01:00
Daniel Marjamäki 9d27917fea c++98 compatibility 2017-10-08 14:16:18 +02:00
Daniel Marjamäki ba8222de1c ValueFlow: Put 'inconclusive' state in the ValueKind. A value can't be both known and inconclusive. 2017-09-20 22:41:36 +02:00
Daniel Marjamäki d79762cfc3 Fixed #7449 (reademptycontainer (inconclusive) when variable changed in function ) 2017-09-15 10:49:58 +02:00
Daniel Marjamäki 97125acabd Fixed #7365 (False positive: Use of erased iterator) 2017-09-08 09:45:30 +02:00
Daniel Marjamäki 1ecefa045a Fixed #8194 (False positive reademptycontainer - range based loop) 2017-09-02 22:22:32 +02:00
Daniel Marjamäki b7f9e7ed1d negativeContainerIndex: avoid crash when AST is wrong 2017-08-22 12:30:43 +02:00
Daniel Marjamäki 2679b576c2 Fixed #1693 (false negative: std::vector, negative index) 2017-08-22 11:04:02 +02:00
Daniel Marjamäki e977cea04c Fix issue detected by Coverity, either null pointer check is useless or there is null pointer dereference 2017-08-02 08:24:16 +02:00
Daniel Marjamäki abf525e46d Fix Cppcheck warning 2017-07-29 11:58:00 +02:00
Daniel Marjamäki a4dd8f0aa4 modernize, use nullptr 2017-07-27 18:36:33 +02:00
Daniel Marjamäki 5ae962194d revert mode change for lib/checkstl.cpp 2017-07-26 23:51:30 +02:00
Daniel Marjamäki 27af3edc5b CheckStl: Safer use of AST 2017-07-26 23:43:39 +02:00
Daniel Marjamäki eb288ec2a1 CheckStl: Use AST to handle iterator comparisons better 2017-07-26 23:13:01 +02:00
Daniel Marjamäki 32940c023a Refactoring: Use continue in loop 2017-07-26 20:32:14 +02:00
Daniel Marjamäki 2d4f64027a Refactoring: Use continue in loop 2017-07-26 20:29:13 +02:00
Daniel Marjamäki 2f38d3d80e CheckStl: Use ValueType 2017-07-26 20:19:36 +02:00
uburuntu f4ce49d883 ENH: perfomance: using clear() and empty() more faster for stl containers 2017-06-02 22:38:00 +04:00
Ayaz Salikhov 28aa939d69 iwyu - include what you use 2017-05-27 04:33:47 +02:00
PKEuS b345c430fe CheckStl::readingEmptyStlContainer(): Skip over lambdas (#8055) 2017-05-07 08:15:58 +02:00
PKEuS b1f4bd7504 Refactorization: Reimplemented Settings::_enabled as a bitfeld instead of std::set (#7995) 2017-04-11 11:49:26 +02:00
Daniel Marjamäki 279425499e Fixed #7930 (Improve check: Missing stlcstr warning for reference variable) 2017-03-01 02:03:08 +01:00
Daniel Marjamäki d840005f06 Fixed #7656 (stlcstr - false positive) 2017-02-26 17:25:32 +01:00
PKEuS cfac3b457d Several small refactorizations 2016-12-06 22:12:02 +01:00
Daniel Marjamäki 0e9810b7f6 CheckStl: validation of iterators returned from functions 2016-11-01 14:08:42 +01:00