Daniel Marjamäki
13c6489571
Redundant variable assignment: Fix FN for struct members
2018-11-27 18:22:22 +01:00
orbitcowboy
4c57f0d33c
std.cfg: Improved support for std::lower_bound() and std::upper_bound().
2018-11-27 13:55:06 +01:00
orbitcowboy
ef77452444
windows.cfg: Added support for _putenv() and _wputenv().
2018-11-27 13:36:39 +01:00
Daniel Marjamäki
32c05fef92
Redundant assignment: check that --enable=style has been used.
2018-11-27 13:04:50 +01:00
Daniel Marjamäki
e501b6a460
donate-cpu: try to handle exceptions when uploading better
2018-11-27 12:05:21 +01:00
Daniel Marjamäki
0ad757fc78
valueFlowLifetime: Try to cleanup the loop a little. No functional change is intended.
2018-11-27 06:43:59 +01:00
Paul Fultz II
5a6f9ac82a
Fix FP with strcmp and terminating conditions
2018-11-27 06:39:29 +01:00
IOBYTE
f2660ed203
template simplifier: fix instantiated template names in forward declarations ( #1495 )
...
This now handles the revised example code in #8603 .
2018-11-27 06:17:04 +01:00
orbitcowboy
18c234e277
windows.cfg: Add support for _getche() and _getwche().
2018-11-26 14:34:40 +01:00
Daniel Marjamäki
2887ee10c0
Fixed #8800 (Possible variable assignment ignored in boolean expression)
2018-11-26 14:00:03 +01:00
orbitcowboy
e18c846ed9
windows.cfg: Added support for _gettch() and _getch().
2018-11-26 13:53:13 +01:00
Daniel Marjamäki
affd03f1d6
Minor tweak for redundantVariableAssignment
2018-11-26 11:16:50 +01:00
IOBYTE
e20079a5d9
template simplifier: fix 3 function forward declaration bugs ( #1493 )
...
* fix support for multi token types
* fix support for const member functions
* fix duplicate template parameters sometimes being inserted
2018-11-26 06:23:12 +01:00
Daniel Marjamäki
86f9fb778b
Fixed #8864 (compile commands: handle define with string value)
2018-11-25 15:09:23 +01:00
Daniel Marjamäki
33027dc10b
triage: better handling of daca@home results
2018-11-25 12:59:08 +01:00
Daniel Marjamäki
0160f80ffe
redundantVarAssignment: avoid FPs when loops are used
2018-11-25 10:32:30 +01:00
Daniel Marjamäki
22f736eae2
redundant variable assignments: avoid FPs for initializations
2018-11-25 08:49:09 +01:00
Daniel Marjamäki
2f66b31d43
redundantAssignmentInSwitch: fix false positive when there is goto
2018-11-24 21:39:01 +01:00
Daniel Marjamäki
d2bd536f1b
triage: improve handling of daca@home results
2018-11-24 21:36:59 +01:00
Matthias Krüger
b5e83d03fe
travis: remove "sudo required" as it is being deprecated.
2018-11-24 12:51:33 +01:00
Daniel Marjamäki
b7ca9bdc8d
Travis: redundantCopy is not detected at the moment
2018-11-24 12:01:10 +01:00
Daniel Marjamäki
ec89c7b1b8
Travis: redundantCopy is not detected at the moment
2018-11-24 11:27:27 +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
866688c70a
Rewriting redundantAssignment checker
2018-11-24 10:03:54 +01:00
Daniel Marjamäki
1048aa8ead
Disable Wshadow warnings
...
[ci skip]
2018-11-23 22:34:21 +01:00
Daniel Marjamäki
336e174458
Travis: Try to suppress false positive
2018-11-23 22:26:59 +01:00
Daniel Marjamäki
b049a31e7c
Refactoring; Use visitAstNodes
2018-11-23 20:41:39 +01:00
Daniel Marjamäki
2b09354b05
Refactoring; use visitAstNodes
2018-11-23 20:33:31 +01:00
Daniel Marjamäki
2214ef5359
Refactor isVLAIndex
2018-11-23 20:23:20 +01:00
Daniel Marjamäki
8f164d9602
Refactoring; use visitAstNodes
2018-11-23 19:22:53 +01:00
Daniel Marjamäki
52f9650533
Refactoring: Use visitAstNodes
2018-11-23 19:16:19 +01:00
Daniel Marjamäki
5e727f92a0
googletest: add TEST_P
2018-11-23 18:55:05 +01:00
Daniel Marjamäki
745b58de26
Refactoring: Use visitAstNodes
2018-11-23 17:18:07 +01:00
Malcolm Parsons
344424b759
cppcheck-htmlreport: Handle errors with multiple locations ( #1488 )
2018-11-23 11:58:19 +01:00
IOBYTE
358f0c473d
Modify template simplifier to add forward declarations of some templa… ( #1489 )
...
* Modify template simplifier to add forward declarations of some template functions so symbol database can make sense of the expanded templates.
* Fix travis.
2018-11-23 11:36:09 +01:00
orbitcowboy
ef05be2600
wxwidgets.cfg: Fixed FP due to overlaoded function wxSizer::Add().
2018-11-23 09:49:08 +01:00
Daniel Marjamäki
ecb3c04fba
astutils: Add function that visits nodes in AST tree
2018-11-23 06:53:43 +01:00
Daniel Marjamäki
c181d28b1a
astyle formatting
...
[ci skip]
2018-11-23 06:47:27 +01:00
orbitcowboy
428d0147bc
wxwidgets.cfg: Added support for wxSizer::Add().
2018-11-22 14:04:22 +01:00
orbitcowboy
d6c85118a7
wxwidgets.cfg: Improved support for some wxStaticText member functions.
2018-11-22 13:47:17 +01:00
orbitcowboy
2b9bdc52d7
wxwidgets.cfg: Added support for wxWindow::Close() and derived classes.
2018-11-22 13:31:09 +01:00
Malcolm Parsons
0af866c9ba
test_htmlreport: cppcheck no longer supports XML file version 1 ( #1487 )
2018-11-22 13:28:01 +01:00
Daniel Marjamäki
a872b3f57a
donate-cpu: take care of unhandled exception when unpacking archive
2018-11-22 08:44:24 +01:00
Daniel Marjamäki
ff3fd80b46
googletest.cfg: Fix file format
2018-11-21 10:20:05 +01:00
Paul Fultz II
f16d9d7d90
Issue 6175: Check lifetime of a variables stored in containers and member variables
...
Cppcheck will now warn for all cases here:
```cpp
#include <vector>
class CCluster {};
class MyClass
{ public:
std::vector<CCluster*> m_cluster;
void createCluster()
{
CCluster cl;
CCluster* pcl=&cl;
m_cluster.push_back(pcl);
}
void createCluster2()
{
CCluster cl;
m_cluster.push_back(&cl);
}
CCluster* Cluster()
{
CCluster cl;
CCluster* pcl=&cl;
return pcl;
}
CCluster* Cluster2()
{
CCluster cl;
return &cl;
}
};
```
2018-11-21 08:43:57 +01:00
Daniel Marjamäki
081bd7660e
Fix Travis
2018-11-21 08:39:21 +01:00
Daniel Marjamäki
9d8e5e36eb
Added a few TODO comments
2018-11-20 22:57:01 +01:00
Daniel Marjamäki
36a84c5406
add googletest.cfg
2018-11-20 18:47:27 +01:00
Daniel Marjamäki
8227188786
comment out old memleak checking. maybe it can be removed.
2018-11-20 18:40:18 +01:00
orbitcowboy
b4aa04db41
std.cfg: Added returnValue calculation for isless(), islessgreater() etc.
2018-11-20 16:58:33 +01:00