IOBYTE
d567b878ba
Fix template instantialion failure for qualified template type. ( #1237 )
2018-05-16 15:24:23 +02:00
orbitcowboy
4e38627a3d
windows.cfg: Improved support for Windows types (ref. https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx ).
2018-05-16 09:16:12 +02:00
Daniel Marjamäki
21ab5c7591
Removed the generated cfg tests, these are not used.
2018-05-16 07:09:08 +02:00
IOBYTE
ce50df8047
Fix override warnings. ( #1234 )
2018-05-15 16:37:40 +02:00
Daniel Marjamäki
6bd4bdb0f9
Updated 'noValidConfiguration' message. It should not write this message when there is no code. It should be possible to see the preprocessor errors otherwise it is hard to fix the configuration.
2018-05-15 15:42:54 +02:00
Daniel Marjamäki
f7746e4fb6
Revert "Missing override specifier warning on a pure virtual function makes no sense. ( #1230 )"
...
This reverts commit 348eb1c5c9
.
2018-05-15 10:48:34 +02:00
orbitcowboy
d0089fe305
windows.cfg: Added missing PFLOAT definition.
2018-05-15 09:43:28 +02:00
IOBYTE
348eb1c5c9
Missing override specifier warning on a pure virtual function makes no sense. ( #1230 )
...
This fixes a large number of false positives for cppcheck source code.
2018-05-14 23:08:40 +02:00
Daniel Marjamäki
66599b4ade
astyle formatting
...
[ci skip]
2018-05-14 22:48:37 +02:00
umanamente
d2d1bf900b
( #8262 ) Added TODO test for "False positive: memory leak with shared_ptr stored in container" ( #1228 )
2018-05-14 13:08:33 +02:00
PKEuS
090a178ed6
Refactorization in SymbolDatabase: Do not redundantly store name in FriendInfo, and store FriendInfo in vector instead of list
2018-05-14 12:18:59 +02:00
PKEuS
4d549553b0
Small optimization in checkmemoryleak.cpp: Allow passing literals to addtoken()
...
Ran AStyle
2018-05-14 10:15:50 +02:00
Paul Fultz II
7ef714b0c6
Fix FP with duplicate assignments by checking if the expression is unique ( #1223 )
...
* Fix FP with duplicate assignments by checking if the expression is unique
* Use array of pointers
* Reorder scope condition
2018-05-13 20:20:55 +02:00
IOBYTE
5c06d08bfb
Fix many DACA2 SymbolDatabase bailout; unhandled code false positives ( #1225 )
2018-05-13 19:00:42 +02:00
IOBYTE
9ee6068e20
Remove duplicate namespace aliases so they don't produce syntax errors. ( #1222 )
...
* Remove duplicate namespace aliases so they don't produce syntax errors.
DACA2 results showed new SymbolDatabase syntax errors when duplicate
namespace aliases were simplified improperly. The solution is to remove
them in the tokenizer when found.
* Add tests for deleting namespace aliases at end of token list.
* Use eraseTokens to delete multiple tokens at once.
2018-05-13 08:29:40 +02:00
Simon Martin
16e1e1d8f9
Ticket #8550 : Properly simplify "typedef class A B;". ( #1224 )
2018-05-12 10:20:33 +02:00
Daniel Marjamäki
98e3f373e9
Revert "Optimize usage of TemplateSimplifier::simplifyCalculations"
...
This reverts commit 3044612fe9
.
I got a report about a significant slowdown for a code.
2018-05-11 21:26:28 +02:00
Daniel Marjamäki
3044612fe9
Optimize usage of TemplateSimplifier::simplifyCalculations
2018-05-11 14:48:59 +02:00
Paul Fultz II
c520735009
Improve checking of size condition against empty to avoid FPs ( #1213 )
...
* Improve checking of size condition against empty to avoid FPs
* Add const and todo for reverse conditions
2018-05-11 10:22:06 +02:00
Daniel Marjamäki
1e7c1841f7
Fixed #8515 (Wrong info message about unmatched suppression)
2018-05-11 09:01:24 +02:00
IOBYTE
9d30496ea1
Extend symbol database test for const volatile member function. ( #1220 )
2018-05-11 08:15:46 +02:00
IOBYTE
184537884f
Don't remove the volatile keyword so we can properly overload functions. ( #1218 )
...
* Don't remove the volatile keyword so we can properly overload functions.
I fixed all the checks that had tests that use volatile. There will
probably be more changes needed due to lack of test coverage for
volatile in some checks.
* Fix unused private function warning.
2018-05-10 07:40:01 +02:00
IOBYTE
5452c4dc4a
Fixed #8560 (Symboldatabase lacks entry for C++11 overloaded member function) ( #1217 )
2018-05-09 20:16:08 +02:00
Sebastian
50aa3620da
posix.cfg: Add minsize to readlink[at] function configurations ( #1216 )
2018-05-09 18:20:45 +02:00
Paul Fultz II
0197343e0c
Fix false positive when using null arithmetic with class type ( #1214 )
2018-05-09 09:06:49 +02:00
Paul Fultz II
f5dbfce8ff
Fix false positive with oppositeExpression when using binary op ( #1211 )
...
* Fix false positive with oppositeExpression when using binary op
* Simplify conditional
2018-05-08 20:43:57 +02:00
IOBYTE
8b0b659965
Add support for namespace aliases and C++17 nested namespaces. ( #1210 )
...
* Add support for namespace aliases and C++17 nested namespaces.
These are implemented as tokenizer simplifications so changes are not
needed to the tokenizer and symbol database.
* Fix codacy warning.
2018-05-08 06:35:51 +02:00
Daniel Marjamäki
8c2a5c9813
astyle formatting
...
[ci skip]
2018-05-06 09:50:53 +02:00
Paul Fultz II
0561877182
Fix false positive with negative array index in issue 8536 ( #1202 )
...
* Fix FP with negative array index in valueflow
* Remove values when valueflow fails
* Add valueflow test
2018-05-06 08:35:29 +02:00
Paul Fultz II
067d82f0ea
Check for smart pointer release ( #1206 )
2018-05-05 18:06:49 +02:00
Daniel Marjamäki
4408628107
Fixed #8538 (SymbolDatabase: wrong parsing of noexcept)
2018-05-05 08:31:56 +02:00
Daniel Marjamäki
64b85b474c
Fixed #8542 (False positive: noOperatorEq)
2018-05-05 07:46:58 +02:00
Daniel Marjamäki
7fb28b05f6
Check Class: Try to clarify the warnings for noCopyConstructor/noOperatorEq/noDestructor.
2018-05-04 15:39:23 +02:00
Daniel Marjamäki
99003c2084
CheckClass: Better handling of defaulted and deleted functions in the noCopyConstructor/noOperatorEq/noDestructor
2018-05-04 14:58:38 +02:00
Paul Fultz II
cac68c6b81
Fix FP when using - as a binary operator ( #1201 )
2018-05-04 07:58:30 +02:00
IOBYTE
f94e9c5447
Fix #8540 (Syntax error involving forward-declared 'enum class') ( #1203 )
2018-05-04 07:56:20 +02:00
Daniel Marjamäki
59cc479855
Save bitfield bit counts
2018-05-02 20:55:11 +02:00
Daniel Marjamäki
7dfbe7389b
Clarify null pointer arithmetic message
2018-05-02 12:57:24 +02:00
Paul Fultz II
f191a3e753
Improve checking of opposite expressions ( #1199 )
...
* Improve checking of opposite expressions
* Fix some formatting
2018-05-02 06:32:33 +02:00
Daniel Marjamäki
b2343a2d4b
Fixed #8518 (Clarify warning for a NULL pointer which is received by a function call parameter.)
2018-05-01 17:30:29 +02:00
Daniel Marjamäki
31148fdfed
Fixed #8523 (Clarify warning: noConstructor)
2018-05-01 15:50:03 +02:00
Daniel Marjamäki
40b6f6b3dd
CheckClass: Fix the noDestructor warning
2018-05-01 15:31:13 +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
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
7015fb097e
SymbolDatabase::isFunction: better handling of return types
2018-04-29 15:35:31 +02:00
Paul Fultz II
e571e598b6
Fix false positive with inner conditions when using pointers ( #1195 )
2018-04-28 18:56:13 +02:00
Daniel Marjamäki
ca8e19c96d
SymbolDatabase: Refactor SymbolDatabase: variable list
2018-04-28 09:38:33 +02:00