115 Commits

Author SHA1 Message Date
Daniel Marjamäki
271763e680 CTU: Refactoring 2018-12-25 21:11:23 +01:00
Daniel Marjamäki
1f1c44a04f Fixed #8677 (False positive: unused method) 2018-08-08 11:31:35 +02:00
Daniel Marjamäki
2a495184d2 Rename private member variables 2018-06-17 18:58:27 +02:00
Daniel Marjamäki
79ffe1d4fc Rename _tokenizer, _settings, _errorLogger 2018-06-16 16:10:28 +02:00
Matthias Krüger
4c8bb9ac6f fix a few typos 2018-05-14 13:11:59 +02:00
Sebastian
f0646d3754 checkunusedfunctions.cpp: Fix files.txt parsing (#1197)
On Windows searching for the last colon finds the colon which is part of
the path of the source file (e.g. "C:/projects/a.cpp"). Thus the path is
saved incomplete. This fix searches for the second instead of the last
colon and uses the data after the second colon as the path of the source
file.
2018-05-01 08:09:11 +02:00
Daniel Marjamäki
f336c2efe7 Refactoring; Renamed Scope::classStart and Scope::classEnd 2018-04-27 22:36:30 +02:00
Daniel Marjamäki
e97be9db2f SymbolDatabase: Refactoring, move logic from SymbolDatabase to Function class. Add a Function::isOverride() method. 2018-04-25 12:05:49 +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
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
3ef3a6088d astyle formatting 2018-03-12 10:19:55 +01:00
Hinterwaeldlers
a9b1f4c640 Taking care of operation overloading functions (#1108) 2018-03-12 10:25:30 +01:00
Daniel Marjamäki
db274e8308 Fix testrunner in cygwin 2018-02-10 15:34:49 +01:00
Daniel Marjamäki
71511f3131 Refactor f487182 2018-02-06 08:59:36 +01:00
Ivan Maidanski
f487182075 Suppressed unused functions should not lead to nonzero exit code (#1026) (#1078)
This is a fix of commit 97ffec8.
2018-02-06 07:44:53 +01:00
Daniel Marjamäki
c4caee6b18 Updated copyright year 2018-01-14 15:37:52 +01:00
Ivan Maidanski
97ffec85c0 Fixed #7502 (Correct exit code if never used function is found) (#1026) 2018-01-12 08:24:01 +01:00
Dmitry-Me
45996b1404 Simplify code, read attribute once 2017-08-24 18:23:44 +03:00
Ayaz Salikhov
b8cd7dbb5c Use nullptr instead of 0 or NULL (#936) 2017-08-09 20:00:26 +02:00
uburuntu
f4ce49d883 ENH: perfomance: using clear() and empty() more faster for stl containers 2017-06-02 22:38:00 +04:00
Sam Truscott
956b5812e7 Fixed #7866 (Crash while scanning QML files) 2017-05-28 16:39:18 +02:00
Ayaz Salikhov
28aa939d69 iwyu - include what you use 2017-05-27 04:33:47 +02:00
PKEuS
b1f4bd7504 Refactorization: Reimplemented Settings::_enabled as a bitfeld instead of std::set (#7995) 2017-04-11 11:49:26 +02:00
orbitcowboy
24332b540d There is no need to clear a class member string in the Ctor. 2016-12-27 21:20:17 +01:00
Daniel Marjamäki
ea905c9a36 Unused Functions: use buildDir if specified. Otherwise use old approach. 2016-12-09 20:11:20 +01:00
Daniel Marjamäki
e9d950d4f5 Cppcheck build dir: Better handling when --project is used 2016-12-08 22:46:44 +01:00
PKEuS
120fe2e4d6 Fixed false positive: The function 'operatorstd::string' is never used. (#7853) 2016-12-08 13:54:54 +01:00
Daniel Marjamäki
1245f1d621 Unused Functions: Fix checking when --cppcheck-build-dir is used. 2016-11-07 21:49:58 +01:00
Daniel Marjamäki
b607e83648 Try to fix travis 2016-11-05 21:45:31 +01:00
Daniel Marjamäki
350e5a7142 UnusedFunctions: Perform checking using analyzeinfo 2016-11-05 21:26:56 +01:00
Matthias Krüger
892a81055d CheckUnusedFunctions::analyzerInfo(): remove unused parameter 'filename'.
Was:

lib/checkunusedfunctions.cpp: In member function ‘std::__cxx11::string CheckUnusedFunctions::analyzerInfo(const string&) const’:
lib/checkunusedfunctions.cpp:292:67: warning: unused parameter ‘filename’ [-Wunused-parameter]
 std::string CheckUnusedFunctions::analyzerInfo(const std::string &filename) const
                                                                   ^~~~~~~~
2016-11-01 13:34:26 +01:00
Daniel Marjamäki
e77d76525e CheckUnusedFunction: generate better analyzerinfo 2016-10-31 20:43:57 +01:00
Daniel Marjamäki
9ff3e85899 Added --cppcheck-build-dir flag 2016-10-29 12:18:11 +02:00
PKEuS
9a6569fde1 Always set ErrorMessage::file0 to ensure that the source file that cppcheck is checking when an error occurs can be identified
Removed unused function and unused includes from preprocessor.h/cpp
2016-07-26 16:28:40 +02:00
Daniel Marjamäki
920ac5a3f6 astyle formatting
[ci skip]
2016-07-16 21:21:24 +02:00
Roberto Martelloni
25525e38a7 CWE mapping of incorrectStringCompare, literalWithCharPtrCompare, charLiteralWithCharPtrCompare, incorrectStringBooleanError, staticStringCompare, stringCompare, signConversion, unusedFunction, unusedVariable 2016-07-16 10:07:06 +01:00
Daniel Marjamäki
79e663dd6f Settings: Remove '_' prefix for public member variables 2016-01-03 16:18:17 +01:00
Lauri Nurmi
996c9244d8 Update copyright year to 2007-2016. 2016-01-01 15:34:45 +02:00
Dmitry-Me
398da8ea7c Cache and reuse result of expensive operation 2015-12-22 14:03:45 +03:00
Daniel Marjamäki
0f9d90d2be Changed Copyrights. Removed my name. 2015-11-18 20:04:50 +01:00
Alexander Mai
0b225fa02f 2nd attempt to fix crash in CheckUnusedFunctions::check. CheckBufferOverrun::checkBufferAllocatedWithStrlen: Don't check for 'new' in C code. 2015-06-28 18:34:09 +02:00
Alexander Mai
02a3a01eca Fix compiler warnings 2015-06-28 18:07:31 +02:00
Alexander Mai
2c73518e29 Fix platform-dependent test result, formatting and crash in whole program analysis 2015-06-28 17:54:48 +02:00
amai2012
4a47b8b3ae Refactoring: Better distinguish between C and C++ in a few checks. 2015-06-28 16:49:16 +02:00
PKEuS
b2835051df Refactorization: Renamed Token::Match pattern %var% to %name%, implement new pattern %var% which is true if varId > 0. 2015-01-31 12:32:04 +01:00
PKEuS
8225b12763 Fixed some cppcheck messages 2015-01-28 22:29:07 +01:00
Thomas Jarosch
4bec2b58fd Unused function check: Fix detection of func.usedOtherFile
Check if function is called from another file or not.
2015-01-07 11:29:37 +01:00
Daniel Marjamäki
ff11ba9847 Updated copyright year to 2015 2015-01-03 12:14:58 +01:00