Paul Fultz II
3109d16b42
Fix issue 9742: FP iterators3 for address of reference to vector in struct ( #2668 )
2020-06-01 08:53:08 +02:00
Paul Fultz II
4270819728
Fix issue 9713: FP invalidContainerLoop when modifying container and immediately exiting the loop ( #2659 )
2020-05-23 07:14:45 +02:00
Paul Fultz II
6162ebd608
Fix issue 9714: FP invalidContainer related to auto and std::string::insert ( #2660 )
2020-05-23 07:13:55 +02:00
Daniel Marjamäki
08ddd84780
Update copyright year
2020-05-10 11:16:32 +02:00
Daniel Marjamäki
3e0218299b
Revert "Update copyright year"
...
This reverts commit 6eec6c4bd5
.
2020-05-10 11:13:05 +02:00
Daniel Marjamäki
6eec6c4bd5
Update copyright year
2020-05-10 11:11:34 +02:00
Paul Fultz II
efdc5f5c4e
Fix issue 9435: False negative: invalidContainer when using range for loop ( #2587 )
...
* Fix issue 9435: False negative: invalidContainer when using range for loop
* Use ast
* Make string const
2020-04-04 11:47:02 +02:00
Daniel Marjamäki
1fd85c0ae8
Fixed #9630 (False positive: in stlIfFind checking, if with initializer is not handled properly)
2020-02-18 19:02:54 +01:00
Paul Fultz II
95a48eac67
Fix issue 9598: False positive: Using iterator to local container that may be invalid for loop handling ( #2539 )
2020-02-16 15:56:52 +01:00
Paul Fultz II
7368a54629
Add generic valueflow forward analysis ( #2511 )
2020-02-13 16:27:06 +01:00
Paul Fultz II
d858bfc338
Fix issue 9599: False positive: Using object that points to local variable that may be invalid ( #2530 )
...
* Fix issue 9599: False positive: Using object that points to local variable that may be invalid
* Improve tests
* Skip else
2020-02-11 11:45:10 +01:00
Ken-Patrick Lehrmann
5f73e1cb32
Fix 9546: properly check that the bound is the size ( #2475 )
...
Previously, as the check was done on the token and not on the ast,
`i <= v.size()` and `i <= v.size() - 2` would both raise the same
warning.
This patch fixes this, but this mean the check is only done when the
condition if `i <= v.size()`. Any other (more complex) condition is
ignore, and so we have false negative for instance with
`i <= v.size() + 1`.
2020-01-05 16:24:25 +01:00
orbitcowboy
ce0f7e201d
Formatted 'wxwidgets.cfg: Added support for more interfaces.'
2020-01-04 00:26:39 +01:00
orbitcowboy
1e0f8ae9b4
Running astyle [ci skip].
2020-01-04 00:06:27 +01:00
Paul Fultz II
30b9455e89
Fix issue 9556: FP mismatchingContainers: raw pointer comparison ( #2465 )
...
* Fix issue 9556: FP mismatchingContainers: raw pointer comparison
* Formatting
2020-01-01 12:02:21 +01:00
Paul Fultz II
82c91f9484
Fix issue 9550: False positive: Same iterator is used with containers 'x' that are defined in different scopes ( #2463 )
2019-12-31 08:09:04 +01:00
Daniel Marjamäki
31bddb6ae0
astyle formatting
...
[ci skip]
2019-12-26 15:48:29 +01:00
Paul Fultz II
42d44f02a2
Use lifetime analysis for checking mismatching containers ( #2456 )
...
* Use lifetimes to check for mismatching containers
* Fix error messages
* Format
* Remove unused variables
* Fix configuration and track iterators through algorithms
* Fix iterator value types in qt config
* Fix library issue with QStringList
* Remove unused functions
* Fix cppcheck errors
2019-12-25 09:32:50 +01:00
Daniel Marjamäki
252c3a17fa
Fixed #7107 (False positive iterators - using alias for container)
2019-12-20 12:13:26 +01:00
Paul Fultz II
f77347d7b4
Fix crash 9492: Crash in FwdAnalysis::checkRecursive() (condTok is nullptr) ( #2411 )
...
* Fix crash 9492: Crash in FwdAnalysis::checkRecursive() (condTok is nullptr)
* Formatting
2019-12-01 14:53:03 +01:00
Paul Fultz II
ba037837c9
Track lifetime across multiple returns
...
This will now warn when doing something like this:
```cpp
template <class T, class K, class V>
const V& get_default(const T& t, const K& k, const V& v) {
auto it = t.find(k);
if (it == t.end()) return v;
return it->second;
}
const int& bar(const std::unordered_map<int, int>& m, int k) {
auto x = 0;
return get_default(m, k, x);
}
```
The lifetime warning is considered inconclusive in this case.
I also updated valueflow to no tinject inconclusive values unless `--inconclusive` flag is passed. This creates some false negatives because library functions are not configured to not modify their input parameters, and there are some checks that do not check if the value is inconclusive or not.
2019-09-11 19:25:09 +02:00
Paul Fultz II
dc201d110d
Fix issue 9274: false negative: (error) Buffer is accessed out of bounds (std::string, std::wstring)
2019-09-03 06:43:54 +02:00
Paul Fultz II
88d194214f
Fix FP with invalidContainerRef ( #2141 )
2019-09-03 06:41:35 +02:00
Paul Fultz II
cb509f1a8b
Fix issue 4845: alias to vector element invalid after vector is changed ( #2113 )
...
* Try harder to track ref lifetimes
* Dont add lifetimes for references
* Use correct token
* Check for front and back as well
* Improve handling of addresses
* Formatting
* Fix FP
2019-09-02 06:58:09 +02:00
Paul Fultz II
121093658d
Fix issue 9202: False positive: std::array, size is a constant ( #2132 )
2019-09-01 09:44:34 +02:00
Daniel Marjamäki
996daaee4e
STL: Fixed outOfBounds false positive
2019-08-24 15:40:29 +02:00
Paul Fultz II
ef714225bb
Use library to track container lifetimes
2019-08-15 21:14:54 +02:00
Paul Fultz II
13df5b2413
Fix FP with negative index and negated condition ( #2081 )
2019-08-14 06:32:31 +02:00
Paul Fultz II
c0c6f92221
Fix issue 8431 and 8776: Size of constant string
...
Fixes these cases:
```cpp
void f(void) {
const std::string msg="xyz";
if(!msg.empty()){} // Always true
}
```
And out of bounds access:
```cpp
#include <string>
char fstr1(){const std::string s = "<a><b>"; return s[42]; }
wchar_t fwstr1(){const std::wstring s = L"<a><b>"; return s[42]; }
```
2019-08-12 20:24:16 +02:00
Paul Fultz II
68e8253920
Fix issue 8313 and 7326: Track values of pointer aliases in valueflow
2019-08-12 12:58:53 +02:00
Paul Fultz II
3ec3bd52e0
Fix FP when using a pointer to a container ( #2029 )
2019-07-24 00:04:49 +02:00
Paul Fultz II
a08a9c1349
Switch to use lifetime analysis for iterators and pointers to invalid containers
...
This will diagnose more issues such as:
```cpp
void f(std::vector<int> &v) {
auto v0 = v.begin();
v.push_back(123);
std::cout << *v0 << std::endl;
}
```
2019-07-18 10:56:44 +02:00
Daniel Marjamäki
90a215af0e
Rephraze performance message. /would be faster/could be faster/ to indicate that Cppcheck is not _sure_ that it would be faster
2019-07-17 16:06:10 +02:00
Daniel Marjamäki
4d9b1e6c3d
Fixed #9094 (Tokenizer::createLinks2 problem with 'x%x<--a==x>x')
2019-05-11 19:11:40 +02:00
Daniel Marjamäki
fe04c15c9e
CheckStl: Modernize the recommendations. string::starts_with is more intuitive than string::compare
2019-05-05 10:35:44 +02:00
Paul Fultz II
091f4bcf8d
Add check for unnecessary search before insertion
...
This will warn for cases where searching in an associative container happens before insertion, like this:
```cpp
void f1(std::set<unsigned>& s, unsigned x) {
if (s.find(x) == s.end()) {
s.insert(x);
}
}
void f2(std::map<unsigned, unsigned>& m, unsigned x) {
if (m.find(x) == m.end()) {
m.emplace(x, 1);
} else {
m[x] = 1;
}
}
```
In the case of the map it could be written as `m[x] = 1` as it will create the key if it doesnt exist, so the extra search is not necessary.
I have this marked as `performance` as it is mostly concerning performance, but there could be a copy-paste error possibly, although I dont think thats common.
2019-05-02 11:04:23 +02:00
Daniel Marjamäki
54bea2847a
STL: Better out of bounds checking for empty containers when index is unknown
2019-03-29 15:20:17 +01:00
Daniel Marjamäki
3c30d274a0
Clarify STL out of bounds warning message
2019-03-29 11:13:25 +01:00
Daniel Marjamäki
e88a0c00c1
Fixed #9039 (STL: array index out of bounds: str.begin() + 1)
2019-03-28 12:49:52 +01:00
Daniel Marjamäki
3dc34f1515
Disable all simplified checks
2019-03-16 09:17:50 +01:00
Daniel Marjamäki
f9fe6cc96a
STL: Removed auto_ptr checking.
2019-03-09 07:48:01 +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
8dd641b8be
Use OVERRIDE in test
2019-01-12 15:45:25 +01:00
Paul Fultz II
be6782d386
Fix FP 8891: Incorrect return scope when using uniform initialization
...
This fixes the FP in:
```cpp
std::string f(const std::string& data)
{
if (data.empty())
return {};
data[0];
}
```
2018-12-14 18:31:10 +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
6493db6ca2
Try to clarify message for container access out of bounds a little more.
2018-11-28 13:58:01 +01:00
Daniel Marjamäki
0f2f807798
Improve the container out of bounds messages. They are still not perfect.
2018-11-28 07:03:56 +01:00
Paul Fultz II
a3921ea861
Refactor valueFlowAfterCondition
...
So this unifies the `valueFlowAfterCondition` so it re-uses more code between checking for integers and container sizes. This should make valueFlowContainer more robust.
It also extends valueflow to support container comparisons such as `if (v.size() < 3)` or `if (v.size() > 3)` using the same mechanism that is used for integers.
2018-11-24 10:07:12 +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
Daniel Marjamäki
053b0d1654
STL: enable inconclusive warnings with --inconclusive
2018-10-09 20:10:43 +02:00
Paul Fultz II
4ed22f1ff8
Fix some FPs in mismatchingContainerExpression ( #1402 )
2018-09-30 14:49:58 +02:00
Paul Fultz II
d43cd56afd
Show line number when suggesting std::transform ( #1385 )
2018-09-21 10:38:30 +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
Paul Fultz II
eb07280075
Fix issue 8743: FP when derefencing iterators ( #1376 )
2018-09-12 17:33:53 +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
Paul Fultz II
f7e7e9bd3c
Fix issue 8736: Iterators to containers from different expressions (a.begin().x == b.begin().x) ( #1370 )
2018-09-07 07:08:02 +02:00
Daniel Marjamäki
756c1d8de7
Fixed #8341 (error:iterators not correct)
2018-09-02 21:04:45 +02:00
Paul Fultz II
f79849f6ba
Diagnose mismatching iterators used together in operators ( #1343 )
...
* Diagnose mismatching iterators used together in operators
* Fix fp getting iterator expression in function call
2018-08-21 06:34:30 +02:00
Daniel Marjamäki
0e30bdef9d
containerAccessOutOfBounds: Fix FPs for maps etc
2018-08-11 18:57:21 +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
Daniel Marjamäki
b398398dec
Fixed #8360 (false positive "Ineffective call of function 'empty()'")
2018-07-10 22:58:02 +02:00
IOBYTE
ce50df8047
Fix override warnings. ( #1234 )
2018-05-15 16:37:40 +02:00
Daniel Marjamäki
8304290f06
astyle formatting
...
[ci skip]
2018-04-27 10:29:27 +02:00
amai2012
55983e2a0b
#8509 Uniform initialization ignored for iterator
2018-04-26 08:57:25 +02:00
Daniel Marjamäki
c4caee6b18
Updated copyright year
2018-01-14 15:37:52 +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
Daniel Marjamäki
b73f5fec7d
Fix invalid code in TestStl test case
2017-09-19 23:22:17 +02:00
Daniel Marjamäki
1a057bc23a
Revert "Remove redundant safety logic (CID 1368511)"
...
This reverts commit d892031f28
.
2017-09-19 23:13:31 +02:00
Daniel Marjamäki
d892031f28
Remove redundant safety logic (CID 1368511)
2017-09-19 23:07:02 +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
2679b576c2
Fixed #1693 (false negative: std::vector, negative index)
2017-08-22 11:04:02 +02:00
Daniel Marjamäki
eb288ec2a1
CheckStl: Use AST to handle iterator comparisons better
2017-07-26 23:13:01 +02: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
Matthias Krüger
494f64cb88
tests: fix some self-check findings about functions that can be static.
...
Was:
[test/testtype.cpp:223]: (performance, inconclusive) Technically the member function 'TestType::removeFloat' can be static.
[test/testsymboldatabase.cpp:61]: (performance, inconclusive) Technically the member function 'TestSymbolDatabase::getSymbolDB_inner' can be static.
[test/teststl.cpp:1437]: (performance, inconclusive) Technically the member function 'TestStl::getArraylength' can be static.
2017-04-09 17:28:00 +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
Robert Reif
4123b457d7
Fixed #7441 (SymbolDatabase: No scope when function return type not specified)
2017-01-06 11:53:17 +01:00
Daniel Marjamäki
5b377ea2e4
Fixed #7821 (segmentation fault, invalid last token)
2016-11-20 14:15:51 +01:00
Daniel Marjamäki
ea545e63c8
astyle formatting
...
[ci skip]
2016-10-27 17:11:32 +02:00
Daniel Marjamäki
f6a5f6bb61
CheckStl::mismatchingContainers: Refactoring, use Library instead of hardcoding
2016-10-27 10:25:45 +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
Daniel Marjamäki
a8df08f22b
Fixed #7659 (crash: Token::varId() : vxl: brdb_selection.cxx)
2016-08-06 18:07:41 +02:00
Daniel Marjamäki
2566fd09da
Fixed #5803 (False positive: Same iterator is used with different containers - insert() from range of different container)
2016-08-04 09:35:16 +02:00
PKEuS
f869f7ebde
Fixed false positive reademptycontainer when end() is called ( #7560 )
2016-07-10 10:48:21 +02:00
PKEuS
ded8d80b23
Library: Support arguments with default value. Fixed default value handling for <container> tags broken in last commit.
2016-07-09 12:44:17 +02:00
PKEuS
896582ce56
Fixes for CheckStl::string_c_str():
...
- Fixed false positive #7480
- Fixed false negative: Show performance message also for non-local objects
2016-05-06 17:25:00 +02:00
PKEuS
b7d8cd69f6
Fixed false negatives in CheckStl::string_c_str():
...
- Support more complex patterns (#7385 )
- Use same logic for string_c_strReturn() as for string_c_strError()
2016-05-04 11:10:12 +02:00
Alexander Mai
ca2e3b9abb
#7370 False positive uselessCallsCompare on unknown type. Ensure related warnings are only issued on STL types
2016-02-02 20:26:02 +01:00
Daniel Marjamäki
fa31ebf88e
Fixed #7349 (checker 'inefficient find()' unintentionally used for find_first_of())
2016-01-29 08:55:46 +01:00
Lauri Nurmi
996c9244d8
Update copyright year to 2007-2016.
2016-01-01 15:34:45 +02:00
PKEuS
12af125fd3
Fixed false positive stlIfStrFind for function call inside condition.
...
Removed unnecessary suppressions in .travis_suppressions
2015-11-20 20:08:53 +01: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
25749ab19f
Fixed another crash in clang test suite and let two times two functions in std.cfg share same configuration
2015-11-15 14:55:30 +01:00
PKEuS
481d800d5a
Fixed crash in clang test suite.
2015-11-15 14:40:31 +01:00
Alexander Mai
869334acf5
#6554 False positive eraseDereference - erase in while() loop. Add regression test for bug fixed in 1.70
2015-11-10 19:03:35 +01:00
PKEuS
32f0cbb6ad
Fixed false positive eraseDereference with range-based for-loops ( #7106 )
2015-11-08 09:42:55 +01:00
PKEuS
3a5cef8a7e
Refactorization: Improved usage of Settings instances in test suite
2015-10-07 18:40:03 +02:00
PKEuS
128a926d9d
Collected some more garbage code tests in testgarbage.cpp; Avoid std::string creation in testgarbage.cpp
2015-08-16 19:12:12 +02:00
Daniel Marjamäki
9085fdc156
Fixed #6887 (False positive eraseDereference - container is member of member variable)
2015-07-30 10:13:49 +02:00
PKEuS
e95800bed4
Added regression test for #4816
...
Ran AStyle
2015-07-23 20:53:50 +02:00
Daniel Marjamäki
3dbf290220
Refactor CheckStl::erase so it doesn't use ExecutionPath
2015-07-23 18:53:31 +02:00
PKEuS
7f6b6e43b1
Support strings in CheckStl::mismatchingContainers() ( #6839 )
2015-07-21 14:13:26 +02:00
Alexander Mai
f0bc300198
#6510 False positive performance warning for std::list::size(). Fix this and other similar false positives. Refactoring of Variable::isStlType(), use fail-safe std::set instead of plain array. Run astyle
2015-05-17 20:02:41 +02:00
PKEuS
33277c6110
Fixed false positive #6679 , fixed unit test for #6663 .
2015-05-11 13:10:11 +02:00
Daniel Marjamäki
aab1d83075
Updated error message. write variable name.
2015-05-02 16:55:17 +02:00
PKEuS
4cbbd44d49
Fixed false positive #6663 : Better support for loops in CheckStl::readingEmptyStlContainer()
2015-05-02 14:09:48 +02:00
Daniel Marjamäki
dc54676289
Reverted my changes I made by mistake in previous commit
2015-05-02 14:01:31 +02:00
Daniel Marjamäki
28985d1baa
manual: Document the cwe attribute
2015-05-02 11:43:42 +02:00
Alexander Mai
42d9afe7de
posix.cfg add more interfaces from stdlib.h. run astyle
2015-03-21 12:26:07 +01:00
Jakub Melka
a49efb13f6
Added auto_ptr checking for malloc
2015-03-19 06:41:54 +01:00
PKEuS
bc5132e0ac
Refactorization: Moved declaration of errout, ... to testsuite.h, uniformized style
2015-03-11 22:54:43 +01:00
PKEuS
e06a4cdf00
Refactorized CheckStl::if_find():
...
- Added support for find()-like functions to Library::Container
- Use <container> information from library
- Fixed false positive #6402
2015-01-04 12:43:50 +01:00
PKEuS
11fa185cae
Fixed crash on range-based for-loop
2015-01-03 22:36:39 +01:00
PKEuS
7ece58c3a0
CheckStl::stlOutOfBounds() now uses <container> information from Libraries
2015-01-03 22:18:33 +01:00
Daniel Marjamäki
ff11ba9847
Updated copyright year to 2015
2015-01-03 12:14:58 +01:00
PKEuS
1355f49af7
Fixed false positive: Support assignments in CheckStl::if_find()
2015-01-03 11:29:13 +01:00
PKEuS
8885ac3eba
Fixed #6217 , refactorized CheckStl::if_find(): allow all comparison operators, use AST, fixed wrong unit tests
2015-01-03 11:07:11 +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
PKEuS
bb8c8d53cc
Support do-loops in CheckStl::stlOutOfBounds()
2014-10-02 20:38:55 +02:00
PKEuS
865df4e207
Fixed false negative #4306 : Detect loop access of empty STL container
2014-08-09 10:06:44 +02:00
Alexander Mai
2e3f26ba58
Patch from Dmitry-Me: reorder checks so that cheaper ones go first, reuse previously computed values, return early on edge condition
2014-06-16 21:36:31 +02:00
amai2012
c61d2b9f41
#5926 Dangerous iterator comparison using operator< on 'std::deque'.
...
std::deque features a random access iterator, so warning stlBoundaries
is a false positive
2014-06-16 20:50:47 +02:00
Mark de Wever
b4b340b7be
Fixed #5677 (Fix overzealous substr() warning)
2014-04-13 19:04:35 +02:00
PKEuS
8cb3b13e56
Support "else if" and do-loop in CheckStl::checkDereferenceInvalidIterator()
2014-04-12 20:03:07 +02:00
PKEuS
e8ac355b39
Refactorized iterator checking:
...
- Fixed false positive #5669
- Use symboldatabase in CheckStl::pushback()
- Improved support for erase on std::vector and find
2014-04-12 20:03:07 +02:00
Daniel Marjamäki
59cd1879db
Fixed #5467 (False positive incorrectly claiming use after erase)
2014-04-09 10:32:56 +02:00
PKEuS
7e4081f7f5
Treat syntaxError and cppcheckError as InternalErrors (throw as exception, #4268 )
2014-03-27 13:15:21 +01:00
Alexander Mai
e1c565357a
Invalid code cause SIGSEGV since loop variable tok2 was not checked properly
2014-03-22 10:32:24 +01:00
PKEuS
af161fc361
Rewrote CheckStl::readingEmptyStlContainer(), resolving all its false positives shown on CppChecks own code
2014-03-18 12:38:22 +01:00
Pranav Khanna
f8a4fb91fe
Fixed #3796 (new check: redundant initialization with empty string)
2014-03-03 18:27:45 +01:00
Daniel Marjamäki
fd3a8a2a18
Update copyright
2014-02-15 07:45:39 +01:00
Lucas Manuel Rodriguez
a34d2eb7b3
Fixed #4938 : (.empty() method false positive for non-STL classes)
2014-01-30 18:09:24 -03:00
PKEuS
4f0121ee2f
Splitted simplification out of tokenize()
2013-12-30 17:45:28 +01:00
Daniel Marjamäki
8687e85e56
Fixed #4850 (False positive: invalidIterator1 detected when iterator container is member of some struct)
2013-10-26 17:48:20 +02:00
Steve Duan
cf0c666d79
Fixed #5041 (Improve check: support 'auto' for 'Iterator used after element has been erased')
2013-09-28 11:50:45 +02:00