Daniel Marjamäki
e5c4e31da6
Fix a number of noOperatorEq and noCopyConstructor warnings
2018-05-01 09:36:21 +02:00
Daniel Marjamäki
9710e819be
CheckClass: Disable noDestructor for now, we need to handle new better
2018-05-01 09:26:03 +02:00
Daniel Marjamäki
42100fdf11
CheckClass: Better handling of non-copyable classes in the noCopyConstructor check
2018-05-01 08:33:23 +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
Sebastian
b370861bed
test/cfg/std.c: Cleaning up function names and redundant tests ( #1198 )
...
Make the names of uninitvar_* functions consistent and fix typos.
Remove completely redundant functions/tests. Combine according tests if
they are not completely redundant.
2018-05-01 07:33:43 +02:00
IOBYTE
c3c1abd05e
SymbolDatabase: improve checking of uninstantiated templates ( #1196 )
...
* SymbolDatabase: improve checking of uninstantiated templates
* Add bailout and debug warning for '>' token without a link in SymbolDatabase::findFunction()..
Don't crash on bad code simplification from tokenizer.
2018-05-01 07:32:19 +02:00
Daniel Marjamäki
73b41455dd
CheckClass: If class has memory management it should have copy constructor, operator= and destructor
2018-04-30 23:13:33 +02:00
Daniel Marjamäki
eb1571af81
Refactoring: use range for
2018-04-30 22:10:54 +02:00
Daniel Marjamäki
fce7a0a128
dump: add Function::type
2018-04-30 16:52:51 +02:00
Daniel Marjamäki
05184555b2
clang-ast: print constructors and destructors
2018-04-30 15:42:40 +02:00
Daniel Marjamäki
1bb7c7fbf2
clang-ast: ensure that '-std=c++11' is used
2018-04-30 10:28:44 +02:00
Daniel Marjamäki
45a89b1c46
compare-ast-clang-and-cppcheck: Write some statistics.
2018-04-30 10:24:01 +02:00
Daniel Marjamäki
aff108a16f
compare-ast-clang-and-cppcheck: Added script that compares the clang and cppcheck AST. For now it only checks if the SymbolDatabase contains the proper function objects.
2018-04-30 10:18:33 +02:00
Daniel Marjamäki
f44f726e10
clang-ast: argument is source file. show CXXMethod also.
2018-04-29 22:37:18 +02:00
Daniel Marjamäki
68cd43d3f9
clang-ast: add tool that uses libclang to output ast for a file
2018-04-29 22:22:32 +02:00
Daniel Marjamäki
7015fb097e
SymbolDatabase::isFunction: better handling of return types
2018-04-29 15:35:31 +02:00
Daniel Marjamäki
45c4456c24
Tokenizer: Code cleanup
2018-04-29 15:05:13 +02:00
Daniel Marjamäki
ff732e41ac
SymbolDatabase: Remove unused Function constructor
2018-04-29 14:57:02 +02:00
Daniel Marjamäki
2f18fbabaa
Addons: Renamed classStart/classEnd to match SymbolDatabase
2018-04-28 23:06:54 +02:00
Daniel Marjamäki
975be66c63
String concatenation in array: Improved handling of macros
2018-04-28 23:01:29 +02:00
Paul Fultz II
e571e598b6
Fix false positive with inner conditions when using pointers ( #1195 )
2018-04-28 18:56:13 +02:00
Markus Elfring
521e3495b7
Adjustment for implementation of Token::insertToken() ( #1194 )
...
Three attributes are reset in this member function even if their values
are stored in the same token object.
Move a corresponding sanity check so that less assignments could be
performed eventually.
Link: https://trac.cppcheck.net/ticket/8532
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2018-04-28 17:17:40 +02:00
Daniel Marjamäki
ca8e19c96d
SymbolDatabase: Refactor SymbolDatabase: variable list
2018-04-28 09:38:33 +02:00
Sebastian
6208ee4af1
std.cfg: Add asctime_s function configuration with tests ( #1191 )
...
* std.cfg: Add asctime_s function configuration with tests
* std.cfg: Remove redundant/not needed not-bool attributes.
2018-04-27 23:51:16 +02:00
Daniel Marjamäki
1a9e8c158d
CheckClass::copyconstructors: Use library to determine if function is a allocation function
2018-04-27 23:20:04 +02:00
orbitcowboy
eb922a140a
wxwidgets.cfg: Added support for wxOVERRIDE.
2018-04-27 23:18:34 +02:00
Daniel Marjamäki
c80c44ab20
Refactoring: use range for loop, early continue
2018-04-27 23:04:48 +02:00
Daniel Marjamäki
f336c2efe7
Refactoring; Renamed Scope::classStart and Scope::classEnd
2018-04-27 22:36:30 +02:00
Daniel Marjamäki
ed79f300f0
Refactoring; use range for loop, use early continue/break
2018-04-27 22:18:26 +02:00
Daniel Marjamäki
e6a37ec0b7
Fixed #8531 (false positive: (style) The function 'foo' overrides a function in a base class but is not marked with a 'override' specifier.)
2018-04-27 21:49:18 +02:00
Daniel Marjamäki
25599a76a7
Handle 'final' specifier better.
2018-04-27 14:57:43 +02:00
Matthias Krüger
5272197e3f
run dmake
2018-04-27 13:11:51 +02:00
Matthias Krüger
ef574987d5
travis: also honor suppressions when checking cppcheck-gui code.
2018-04-27 13:10:42 +02:00
Daniel Marjamäki
16a9d5a62e
Travis: Suppress missingOverride warnings because we do not want to fix these at this point
2018-04-27 12:43:32 +02:00
Daniel Marjamäki
b830f462e6
Added missingOverride checker; Function 'f' overrides function in base class but does not have the 'override' keyword.
2018-04-27 11:12:09 +02:00
Daniel Marjamäki
c7e5b941be
Symbol database: Minor tweaks
2018-04-27 10:35:11 +02:00
Daniel Marjamäki
8304290f06
astyle formatting
...
[ci skip]
2018-04-27 10:29:27 +02:00
Daniel Marjamäki
d15b945c9e
SymbolDatabase::isFunction: Fix wrong detection function
2018-04-27 10:24:02 +02:00
Simon Martin
9fade65dbb
Ticket #8281 , #8417 : Properly detect the end of "switch" statements to accept all legitimate uses of "case". ( #1112 )
2018-04-26 22:26:26 +02:00
Daniel Marjamäki
5384802e16
SymbolDatabase: Look for types in anonymous scopes
2018-04-26 17:55:04 +02:00
Sebastian
b1bd6bb9ff
GUI: Applicationlist: Add Microsoft Visual Studio Code (on Windows) ( #1193 )
2018-04-26 16:26:10 +02:00
amai2012
55983e2a0b
#8509 Uniform initialization ignored for iterator
2018-04-26 08:57:25 +02:00
Daniel Marjamäki
d8634ca2a9
SymbolDatabase: Disable code for function pointers
...
This hopefully fixes all Travis crashes when running cppcheck:
[./test/Analysis/stack-addr-ps.c] (error) Internal error: Child process crashed with signal 11 [cppcheckError]
[./test/Index/complete-pointer-and-reference-to-functions.cpp] (error) Internal error: Child process crashed with signal 11 [cppcheckError]
[./test/SemaCXX/vararg-non-pod.cpp] (error) Internal error: Child process crashed with signal 11 [cppcheckError]
2018-04-25 18:48:26 +02:00
rebnridgway
faf348306b
Escaped filename, which can contain invalid xml ( #1192 )
2018-04-25 18:28:04 +02:00
Daniel Marjamäki
e95c6e3038
Travis: Fix segmentation fault
2018-04-25 16:02:42 +02:00
Daniel Marjamäki
bd54986017
SymbolDatabase: Refactoring parsing of ) ... in functions
2018-04-25 14:35:09 +02:00
Daniel Marjamäki
6efe118aa3
Fix Cppcheck warning
2018-04-25 14:29:34 +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
Daniel Marjamäki
9aeb2aaa17
update doxygen comments
2018-04-25 10:14:57 +02:00
Sebastian
4b104c4576
std.cfg: Add some missing C++11 declarations comments and not-bool attributes ( #1183 )
2018-04-25 08:54:36 +02:00