Alexander Mai
173a2e9ea2
#5641 fix crash within CheckClass::initializeVarList()
2014-04-04 22:13:51 +02:00
Daniel Marjamäki
640431c569
Fixed #5611 (segfault when checking pcsc-cyberjack. either symboldatabase or checkMemset)
2014-03-30 17:38:07 +02:00
Alexander Mai
70885c78e4
Fix endless recursion within CheckClass::isConstMemberFunc() caused by incomplete/missing template declaration
2014-03-30 10:09:57 +02:00
Alexander Mai
bf335217cd
Fix #5605 part 2 - now endless recursion within CheckClass::isMemberFunc()
2014-03-30 08:31:02 +02:00
Alexander Mai
d1b1699bb0
Fix #5606 - Endless recursion in CheckClass::isMemberVar(). New function Type::hasCircularDependencies() is supposed to detect loops within the class hierarchy which was causing the problem
2014-03-29 12:21:35 +01:00
Alexander Mai
34d1f885a3
Ticket #4296 : Improve message text for operatorEq
2014-03-28 20:29:33 +01:00
Daniel Marjamäki
2a0716449f
Fixed #5498 (C++0x11 default values for class fields and missing constructor)
2014-03-24 06:15:51 +01:00
PKEuS
77c17100ec
Bailout in private function usage checking for operators ( #5059 ).
2014-03-23 10:06:14 +01:00
PKEuS
b6b374cf3d
Added verbose message for "memsetClass" error. ( #5183 )
2014-03-17 13:23:23 +01:00
PKEuS
1e57f54917
Fixed #5481 : std::array is POD, so using memcpy (etc.) is allowed on it.
2014-03-16 19:55:32 +01:00
Alexander Mai
40ddcabab6
Fixed #4461 (Warn about memset/memcpy on class with references as members)
2014-03-15 18:22:29 +01:00
Thomas Jarosch
93341f4449
Use simple match where possible
...
Fixes these warnings found by "--enable=internal":
[lib/checkclass.cpp:972]: (warning) Found simple pattern inside Token::Match() call: "* *"
[lib/checkbufferoverrun.cpp:635]: (warning) Found simple pattern inside Token::Match() call: "."
[lib/checkbufferoverrun.cpp:1397]: (warning) Found simple pattern inside Token::Match() call: ";"
[lib/checksizeof.cpp:299]: (warning) Found simple pattern inside Token::Match() call: "."
[lib/checksizeof.cpp:301]: (warning) Found simple pattern inside Token::Match() call: ")"
[lib/checksizeof.cpp:303]: (warning) Found simple pattern inside Token::Match() call: "]"
[lib/checksizeof.cpp:318]: (warning) Found simple pattern inside Token::Match() call: ")"
[lib/checknullpointer.cpp:413]: (warning) Found simple pattern inside Token::Match() call: "delete"
[lib/checkio.cpp:1336]: (warning) Found simple pattern inside Token::Match() call: "> ("
[lib/checkstl.cpp:1509]: (warning) Found simple pattern inside Token::findmatch() call: ";"
[lib/checkstl.cpp:1512]: (warning) Found simple pattern inside Token::findmatch() call: ";"
[lib/checkstl.cpp:1594]: (warning) Found simple pattern inside Token::Match() call: "="
[lib/checkstl.cpp:1598]: (warning) Found simple pattern inside Token::Match() call: "] ="
[lib/checkunusedvar.cpp:755]: (warning) Found simple pattern inside Token::Match() call: "goto"
[lib/checkunusedvar.cpp:793]: (warning) Found simple pattern inside Token::Match() call: "="
[lib/checkuninitvar.cpp:376]: (warning) Found simple pattern inside Token::Match() call: "> ("
[lib/checkother.cpp:86]: (warning) Found simple pattern inside Token::Match() call: "> ("
[lib/checkother.cpp:2181]: (warning) Found simple pattern inside Token::Match() call: "> {"
[lib/valueflow.cpp:54]: (warning) Found simple pattern inside Token::Match() call: "&"
[lib/valueflow.cpp:409]: (warning) Found simple pattern inside Token::Match() call: "do"
[lib/valueflow.cpp:425]: (warning) Found simple pattern inside Token::Match() call: ") {"
[lib/valueflow.cpp:487]: (warning) Found simple pattern inside Token::Match() call: ") {"
[lib/valueflow.cpp:511]: (warning) Found simple pattern inside Token::Match() call: "} else {"
[lib/valueflow.cpp:615]: (warning) Found simple pattern inside Token::Match() call: "for ("
[lib/symboldatabase.cpp:80]: (warning) Found simple pattern inside Token::Match() call: "= {"
[lib/symboldatabase.cpp:1069]: (warning) Found simple pattern inside Token::Match() call: "std ::"
[lib/tokenize.cpp:2207]: (warning) Found simple pattern inside Token::Match() call: "< >"
[lib/tokenize.cpp:2730]: (warning) Found simple pattern inside Token::Match() call: ";"
[lib/tokenize.cpp:4234]: (warning) Found simple pattern inside Token::Match() call: "try {"
[lib/tokenize.cpp:4235]: (warning) Found simple pattern inside Token::Match() call: "} catch ("
[lib/tokenize.cpp:5500]: (warning) Found simple pattern inside Token::Match() call: "INT8"
[lib/tokenize.cpp:5752]: (warning) Found simple pattern inside Token::Match() call: "}"
[lib/tokenize.cpp:5752]: (warning) Found simple pattern inside Token::Match() call: "do"
2014-03-14 16:27:47 +01:00
Robert Reif
d1eb04c539
Fixed #4302 (Member variable not initialized in public delegate constructor)
2014-03-12 05:48:13 +01:00
Simon Martin
8baf8dbebb
Ticket #5425 : Avoid infinite recursion in checkMemsetType for invalid input
2014-03-03 07:19:32 +01:00
Lauri Nurmi
70a67eaf85
Change some more 0 literals into nullptr.
2014-02-16 13:38:50 +02:00
Daniel Marjamäki
23efc68dd7
use nullptr
2014-02-16 10:32:10 +01:00
Daniel Marjamäki
fd3a8a2a18
Update copyright
2014-02-15 07:45:39 +01:00
Lucas Manuel Rodriguez
ad0269eeeb
Refactor checks using Variable::isStlType()
2014-01-30 01:26:48 -03:00
Daniel Marjamäki
a98c66b048
Fixed Token::Match pattern. See also #5310
2014-01-05 23:02:07 +01:00
Daniel Marjamäki
d62055277d
Fixed #4787 (False Positive: Unused private function)
2014-01-01 18:36:51 +01:00
Alexander Mai
5539e9ea0f
Fixed #5279 (False positive: warning (uninitMemberVar): Member variable 'ToDoubleArray::mfNaN' is not initialized in the constructor. (modified #5170 example))
2014-01-01 18:34:39 +01:00
Daniel Marjamäki
92305ed1f9
Fixed #5170 (False positive: warning (uninitMemberVar): Member variable 'ToDoubleArray::mfNaN' is not initialized in the constructor.)
2013-12-15 14:07:29 +01:00
Alexander Mai
7d45e9be73
Fixed #5122 (duplInheritedMember on private variables)
2013-11-21 05:39:23 +01:00
Daniel Marjamäki
ff5f223a1d
Fixed #5116 (false positive: memset on class (nested struct))
2013-11-18 16:56:00 +01:00
Martin Ettl
babbee4e73
Fixed typos in comments, no functional changes.
2013-11-09 16:07:28 +01:00
Sam Truscott
6806fd8135
Extended Qt support through Library
2013-10-20 14:09:10 +02:00
Frank Zingsheim
67915749b0
Fixed #4723 (False positive: Pure virtual call within conditional clause)
...
conditional clauses directly in constructor/destructor cannot prevent
pure virtual function call otherwise this part of the code would never been called
2013-09-27 09:25:38 +02:00
Frank Zingsheim
445d08d082
Fixed #4723 (False positive: Pure virtual call within conditional clause)
2013-09-26 17:25:16 +02:00
PKEuS
8e84f30244
Refactorization: Make use of Function::retDef where it makes sense
2013-09-03 11:40:43 +02:00
PKEuS
b36a887608
Fixed false positive #5004
2013-09-03 10:54:10 +02:00
Lucas Manuel Rodriguez
92b7280d13
Fixed #4995 (False positive - Using 'memset' on class that contains a virtual method) - Better fix
2013-08-30 22:06:20 -03:00
Lucas Manuel Rodriguez
c26674dc97
Fixed #4995 (False positive - Using 'memset' on class that contains a virtual method)
2013-08-30 08:46:33 -03:00
Ettl Martin
e223e13747
Fixed #4987 (spellfix for verbose message in CheckClass::noConstructorError)
2013-08-28 05:48:31 +02:00
Daniel Marjamäki
80093f0a40
Fixed #4689 (False positive: Unused private function (used in default argument of constructor))
2013-08-26 16:41:23 +02:00
Lucas Manuel Rodriguez
006b8055e5
Fixed #4676 (Duplicated inherited member check)
2013-08-20 06:29:19 +02:00
PKEuS
a9a5dc0354
Updated to AStyle 2.03, require this version
2013-08-07 16:27:37 +02:00
Daniel Marjamäki
9c67af058a
SymbolDatabase: Renamed Variable::varId() to Variable::declarationId() to make it more clear how it works.
2013-07-20 12:31:04 +02:00
Robert Reif
870d29944b
Fixed #4852 (false positive: Member variable 'A::sz' is not initialized in the constructor)
2013-06-14 06:32:26 +02:00
Daniel Marjamäki
1476787f40
CheckClass: Fixed nullpointer check and then dereference warning.
2013-05-17 14:10:53 +02:00
Frank Zingsheim
54e7c8f6a2
Implemented support for move constructors:
...
Adapt code to Function::eMoveConstructor
introduced in commit eb2962792f
2013-04-10 21:57:22 +02:00
Frank Zingsheim
1935c544e0
Fixed #4656 (New check: Detect pure virtual function calls)
...
C++11: move constructor
2013-04-08 20:48:45 +02:00
Frank Zingsheim
47360f1191
Fixed #4656 (New check: Detect pure virtual function calls)
...
C++11: move constructor
2013-04-08 19:37:08 +02:00
Frank Zingsheim
5d55d40361
Fixed #4656 (New check: Detect pure virtual function calls)
2013-03-30 15:09:22 +01:00
PKEuS
ed477ceb74
Fixed false negative mentioned in #4354 .
2013-03-14 09:27:42 -07:00
Robert Reif
25c36b56fa
CheckClass: made warnings about uninitialized members in default constructors inconclusive. Ticket: #4639
2013-03-09 09:20:48 +01:00
PKEuS
9287e40e99
Incresed constness of several pointers in symboldatabase
2013-03-05 09:42:42 -08:00
PKEuS
a94598e447
Fixed some gcc and cppcheck messages
2013-03-05 07:07:59 -08:00
PKEuS
ca96aaa53b
Avoided unnecessary usage of symbolDatabase->isClassOrStruct()
2013-03-05 06:55:31 -08:00
PKEuS
7bc729bc63
- Moved more functionality from Scope to Type: BaseInfo and FriendInfo
...
- Replaced Scope->findQualifiedScope by SymbolDatabase::findScope
- Improved SymbolDatabase::findType
2013-03-05 06:28:40 -08:00
PKEuS
66a3555897
Implement initial support for Types in Symboldatabase:
...
- For each class/struct/union, a Type instance is added to SymbolDatabase::typeList.
- A scope is no longer created for declared but not defined types
Fixed name detection for classes when they are declared like this: "class ::Foo::Sub {..."
2013-03-05 04:33:38 -08:00