Commit Graph

6486 Commits

Author SHA1 Message Date
Daniel Marjamäki 8a72bb8aa8 AST: Fixed AST for struct initialisation 2015-07-21 11:40:42 +02:00
PKEuS 149d11d9ad Improved handling of inline assembly (#6813):
- Add ; after asm {} block if required
- Fixed inline suppressions
2015-07-20 23:09:54 +02:00
PKEuS a0890ecd2c Fixed false positive: Do not print useClosedFile on arrays (#6823) 2015-07-20 22:40:19 +02:00
PKEuS c987a99ac8 Fixed hang on garbage code (#6824) 2015-07-20 22:33:32 +02:00
Daniel Marjamäki 749bb34deb Fixed #6830 (ValueFlow: value of switch-variable inside switch) 2015-07-20 19:45:38 +02:00
Alexander Mai defee734f5 #6846 segmentation fault (invalid code) in CheckClass::hasAssignSelf 2015-07-20 19:04:34 +02:00
Daniel Marjamäki c0880c8d79 ValueFlow: Values that are assigned in switch are possible after switch 2015-07-20 09:36:56 +02:00
Frank Zingsheim 8416be4d9d #6345 Tokenizer::simplifyTypedef() adds redundant 'typename' to declaration 2015-07-20 07:55:22 +02:00
amai2012 af9b67562b Merge pull request #626 from simartin/ticket_6648
Ticket #6648: Properly handle variables that have been deallocated and whose _address_ is taken after
2015-07-19 18:04:47 +02:00
Simon Martin fa94f2e0f4 Ticket #6648: Properly handle variables that have been deallocated and whose _address_ is taken after in CheckLeakAutoVar. 2015-07-19 17:37:50 +02:00
Alexander Mai 8b97f04de4 Try to address some Coverity issues. Add TODO testcase for #5783. Introduce TODO_ASSERT macro. 2015-07-19 15:03:35 +02:00
orbitcowboy f1f46611d6 Merge pull request #624 from simartin/ticket_6601_template_parameters
Added unit test involving function reference for TemplateSimplifier::templateParameters
2015-07-19 09:02:43 +02:00
Simon Martin d218b95349 Ticket #5776: Since the fix is in Tokenizer, it makes more sense to have a Tokenizer unit test. 2015-07-19 00:10:47 +02:00
Simon Martin d1d51c5bb7 Added unit test involving function reference for TemplateSimplifier::templateParameters. 2015-07-18 23:56:55 +02:00
Daniel Marjamäki ce7e879460 ValueFlow: isVariableChanged() should return true when variable is changed by passing its address to subfunction 2015-07-18 15:35:39 +02:00
Daniel Marjamäki 5aa0b284dc ValueFlow: Evaluate more calculations when operands have known values 2015-07-18 15:03:57 +02:00
Simon Martin 1f73d71542 Ticket #5776: Simplify (&a)->b into a.b 2015-07-17 23:27:35 +02:00
Simon Martin af1b0cfddf Ticket #6835: Don't get confused by parentheses while detecting template parameter default values. 2015-07-17 21:30:34 +02:00
Daniel Marjamäki 25d9ebedd8 ValueFlow: fixed known/possible value of static variable 2015-07-17 20:48:37 +02:00
Daniel Marjamäki f1e410a878 ValueFlow: value that is changed in do while loop must be possible instead of known. 2015-07-17 20:30:34 +02:00
Daniel Marjamäki cb04dfbd37 Fixed #4842 (condition is always true (variable is assigned constant value and then used in condition)) 2015-07-17 15:30:23 +02:00
Daniel Marjamäki 61cf224f32 ValueFlow: Make known loop value possible 2015-07-17 10:24:24 +02:00
Daniel Marjamäki 3d5781743c ValueFlow: Restore handling of not 2015-07-16 21:17:44 +02:00
Daniel Marjamäki 15a8e4d2df Temporarily revert "Fixed #4842 (condition is always true (variable is assigned constant value and then used in condition))"
This reverts commit a3fbad50cb.

The ValueFlow must be updated before this can be re-added.
2015-07-16 21:10:46 +02:00
Daniel Marjamäki 09efe140fe ValueFlow: Change value to 'Possible' after conditional assignment in inner loop 2015-07-16 21:08:32 +02:00
Daniel Marjamäki 38214b6907 ValueFlow: function arguments only has 'possible' values 2015-07-16 20:49:14 +02:00
Daniel Marjamäki a3fbad50cb Fixed #4842 (condition is always true (variable is assigned constant value and then used in condition)) 2015-07-16 20:17:57 +02:00
Daniel Marjamäki 88491267d6 ValueFlow: Added Value::valueKind that says if value is known or possible 2015-07-16 17:33:16 +02:00
orbitcowboy 48fed95942 Fixed wrong test case in testother: mathfunctionCall_atan2(). 2015-07-16 10:55:58 +02:00
orbitcowboy 1d910bc3bc #6313: Added test case for oppositeInnerCondition. 2015-07-16 08:44:38 +02:00
Alexander Mai d45aa6170b Minor refactoring in Tokenizer: Optimize for C code and use nullptr instead of 0 2015-07-16 00:29:48 +02:00
Simon Martin 2d8993319c Ticket #6810: Avoid infinite loop upon invalid typed enum declaration. 2015-07-15 21:39:15 +02:00
Daniel Marjamäki b821e996e1 MathLib: Add TEST_MATHLIB_VALUE that is used to test MathLib::value 2015-07-15 17:36:41 +02:00
orbitcowboy dda5e46d1d Fixed typo in comment. No functional changes. 2015-07-15 15:29:35 +02:00
Alexander Mai b604d63dd8 #6726 cppcheck hangs with 100% CPU load (invalidcode) inside Token::astOperand2(). #6840 egmentation fault (invalid code) in Token::astOperand2. Improve stability on invalid code 2015-07-15 15:19:48 +02:00
Alexander Mai b30d9ffe98 #6838 cppcheck hangs on some strange input code. Token::astOperand1/2 throw internal error on garbage code instead of creating endless recursion in AST 2015-07-14 21:07:10 +02:00
Daniel Marjamäki cf53074fd9 astyle formatting 2015-07-14 18:09:28 +02:00
Antti Tuppurainen a75872a15e Fix uniform init in out-of-class ctor-initer 2015-07-14 18:09:07 +02:00
Daniel Marjamäki 405a1fba11 ValueFlow: set values for false/true 2015-07-14 18:02:26 +02:00
Martin Ettl 027bdd3370 Reverted cebc105856. 2015-07-13 21:31:24 +02:00
Daniel Marjamäki 1a872a2c9f Fixed #6019 (false negative: Expression is always true/false '!(v!=10) && !(v!=20)') 2015-07-13 20:53:49 +02:00
orbitcowboy 08d6c244ee Running astyle. 2015-07-13 16:50:48 +02:00
orbitcowboy cebc105856 Changed test case from recent commit into a TODO test case. Since it is a FP. 2015-07-13 16:50:23 +02:00
orbitcowboy d042151b62 Checkother:selfAssignment: Improved test coverage. 2015-07-13 16:39:21 +02:00
Daniel Marjamäki 7ccd30362c Fixed #6826 (False positive: ValueFlow conditional value used in condition) 2015-07-12 19:35:47 +02:00
Daniel Marjamäki b8e77c8005 valueflow: fix for ?:. the condition result is not a result of the ?. 2015-07-04 11:17:38 +02:00
Daniel Marjamäki fef251ac76 negative array size: fixed noise when array is not vla 2015-07-04 09:42:42 +02:00
Daniel Marjamäki 7e1ddea653 One more fix for #6811 (ValueFlow: result of ?:) 2015-07-02 20:52:04 +02:00
Daniel Marjamäki c751039612 Fixed #6811 (ValueFlow: result of ?:) 2015-07-02 20:11:27 +02:00
Daniel Marjamäki 14044bf60b testrunner: revert changes to avoid compiler warnings 2015-07-01 19:15:27 +02:00