1590 Commits

Author SHA1 Message Date
Daniel Marjamäki
34730f623a Fixed #5301 (False positive: (error) Division by zero - variables read from input stream) 2014-02-22 12:09:54 +01:00
Lauri Nurmi
70a67eaf85 Change some more 0 literals into nullptr. 2014-02-16 13:38:50 +02:00
Daniel Marjamäki
384ffb4173 use nullptr in lib/tokenize.cpp 2014-02-15 08:04:54 +01:00
Daniel Marjamäki
fd3a8a2a18 Update copyright 2014-02-15 07:45:39 +01:00
Daniel Marjamäki
abe8439917 Fixed #5416 (False positive: Array accessed at index, which is out of bounds.) 2014-01-28 16:55:10 +01:00
Daniel Marjamäki
b91f42453b value flow: improved handling of cast 2014-01-20 22:26:55 +01:00
Daniel Marjamäki
498cdb8610 added debug output for the value flow 2014-01-18 09:58:32 +01:00
Daniel Marjamäki
30cae358d8 Removed the --value-flow flag. ValueFlow analysis will always be enabled from now on. 2014-01-17 18:07:05 +01:00
Daniel Marjamäki
311059f603 Tokenizer: Removed commented-out simplification 2014-01-17 17:44:33 +01:00
Daniel Marjamäki
0203a4a6f5 Tokenizer: Removed simplifyGoto as it's the cause of various FPs I see 2014-01-17 17:36:45 +01:00
Daniel Marjamäki
4eb746d7cc Tokenizer: Removed simplifyComparisonOrder 2014-01-17 17:25:56 +01:00
Daniel Marjamäki
ab866be03a Tokenizer: Move 'else if' simplification to tokenize 2014-01-12 17:47:02 +01:00
Heinrich Schuchardt
f6510a6b45 Fixed #5339 (Tokenizer::setVarId : function-pointer function argument not getting variable id, causing FP) 2014-01-12 15:15:09 +01:00
Daniel Marjamäki
752e9d0fb7 Tokenizer::varId: Fixed wrong varid for shadow types with same names as class members 2014-01-09 21:44:29 +01:00
Daniel Marjamäki
4f11086505 Tokenizer: Don't remove parentheses in 'a?b:(c>0?d:e)' 2014-01-08 20:53:33 +01:00
Martin Ettl
fa04273473 Merge branch 'master' of https://github.com/danmar/cppcheck 2014-01-06 18:51:15 +01:00
Zachary Blair
4a2da09491 minor cleanups. initialize members in initialization list 2014-01-06 08:02:04 +01:00
Daniel Marjamäki
afaf1473a8 Value flow: refactorings, write debug warning if iterating too far 2014-01-05 20:06:46 +01:00
Daniel Marjamäki
29c64cc34c Merge pull request #209 from simartin/ticket_5266
Ticket #5266: Properly tokenize "complex" static variable declarations.
2014-01-05 04:44:22 -08:00
Daniel Marjamäki
d8270c710a Add new experimental value flow analysis 2014-01-04 20:57:02 +01:00
Simon Martin
d2cf9fd77c Ticket #5266: Properly tokenize "complex" static variable declarations. 2014-01-04 10:49:27 +01:00
Simon Martin
6019f45249 Ticket #5201: Get rid of internal error when checking valid C input for memory leaks. 2014-01-03 23:27:56 +01:00
Martin Ettl
5a5277f2fa Tokenizer::simplifyVarDecl: Fixed crash when checking garbage code. 2014-01-01 19:15:32 +01:00
Martin Ettl
0dccd3a632 Tokenizer:simplifyFlowControl(): Fixed crash on garbage code. 2014-01-01 19:04:02 +01:00
Daniel Marjamäki
32be4094e7 Symbol database: only put variables in variable list 2013-12-31 17:51:56 +01:00
PKEuS
4f0121ee2f Splitted simplification out of tokenize() 2013-12-30 17:45:28 +01:00
Daniel Marjamäki
41e4194573 Tokenizer: set links for <> in 'a=new b<c>;' code 2013-12-29 15:37:27 +01:00
Daniel Marjamäki
596b4bd405 astyle formatting 2013-12-23 12:26:12 +01:00
Simon Martin
02dc49624d Ticket #5214: Don't read out of bounds upon invalid ternary operator. 2013-12-22 18:13:52 +01:00
Daniel Marjamäki
e2bc99aa24 Fixed #5154 (Tokenizer: wrong handling of msvc 'for each') 2013-12-17 06:34:27 +01:00
Daniel Marjamäki
762806499f Fixed #5182 (Tokenizer::simplifyEnum: template function call as enum value) 2013-12-16 07:07:00 +01:00
Daniel Marjamäki
7938692b01 Fixed #5212 (Tokenizer::simplifyEnum bad simplification of enum value (1<<0)|(1<<1)) 2013-12-15 07:47:04 +01:00
Daniel Marjamäki
f599e3184c Fixed #5174 (Tokenizer: member function 'abort' returns) 2013-12-14 11:12:48 +01:00
Daniel Marjamäki
5ba02d2fdd AST: Always use AST 2013-12-09 18:06:19 +01:00
Daniel Marjamäki
0c5282b1af Fixed #5081 (False positive: (error) Uninitialized variable: f (handling of C-cast not correct)) 2013-11-28 16:04:47 +01:00
Alexander Mai
38b2f6b9b0 Fixed #5168 (segmentation fault (invalid code) in Tokenizer::simplifyVarDecl) 2013-11-24 11:07:11 +01:00
Simon Martin
9817da00ec Ticket #5168: Don't crash when simplifying bit-fields for invalid code. 2013-11-23 20:33:03 +01:00
orbitcowboy
b74db1b791 Tokenize:simplifyFloatCast(): added corresponding suffix, incase of type 'float'. 2013-11-20 23:58:43 -08:00
Daniel Marjamäki
ef108c49ec Tokenizer: simplify enums better. add parentheses to enforce operator precedence. 2013-11-20 18:04:28 +01:00
Daniel Marjamäki
47b98470eb Tokenizer: Simplify float casts of integer constants 2013-11-19 18:07:12 +01:00
Daniel Marjamäki
2a640a59c2 Tokenizer: Improved handling of pointer aliases. This fixes some false negatives. 2013-11-16 17:30:04 +01:00
Daniel Marjamäki
30720affd6 Tokenizer::setVarId: Fixed hang when checking libgc 2013-11-15 16:16:22 +01:00
Daniel Marjamäki
7fe51eb58b Fixed #4989 (False positive: Wrong processing of __asm block) 2013-11-13 06:04:00 +01:00
Martin Ettl
347e1eae20 Fixed #5162: Tokenizer:simplifyInitVar: Unused pointer value (UNUSED_VALUE) returned_pointer: Pointer tok2 returned by tok2->next() is never used (CID 1124084). 2013-11-10 00:40:42 +01:00
Daniel Marjamäki
b0ce42565e AST: Added experimental new implementations for CheckAssignIf::comparison, CheckOther::checkIncorrectLogicOperator and CheckOther::checkDuplicateExpression 2013-11-07 14:38:08 +01:00
orbitcowboy
929cda6696 fixed #5141: Tokenizer: Dereference before null check (Scan.coverity id 1061759) 2013-11-04 03:53:23 -08:00
Daniel Marjamki
bcc8384a95 Fixed #5145 (False Positive: Variable 'A' hides enumerator with same name) 2013-11-03 09:34:48 +01:00
Daniel Marjamäki
5f0cfa0ee4 Fixed #4983 (False positive warning 'Possible null pointer dereference: lblList - otherwise it is redundant to check it against null.' with sizeof lblList[0]) 2013-11-02 23:56:10 +01:00
Daniel Marjamäki
bbdfd8b5c7 Make it possible to create AST, by using the --ast flag 2013-11-02 18:37:35 +01:00
Daniel Marjamäki
f0a621a952 Tokenizer: Added MAXTIME so cppcheck can be compiled with a hard max time. Will be used for the daca2. 2013-11-02 17:31:14 +01:00