Commit Graph

13331 Commits

Author SHA1 Message Date
Daniel Marjamäki 9bdee7fce9 ValueFlow: Refactoring setTokenValue() 2015-07-17 09:46:31 +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 fa13179c68 Fixed Cppcheck warning, condition is always true 2015-07-16 20:23:25 +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
Daniel Marjamäki daf859c5bd appveyor: disable 64-bit builds for now since there are link problem (LINK : fatal error LNK1104: cannot open file 'kernel32.lib') 2015-07-16 12:23:12 +02:00
Daniel Marjamäki 3dfb84ed85 appveyor: attempt to fix PlatformToolset problem 2015-07-16 12:12:52 +02:00
Daniel Marjamäki bb3686e62f appveyor: use Visual Studio 2010 2015-07-16 12:04:15 +02:00
Daniel Marjamäki a4d28458cd travis: use TEST_MATHLIB_VALUE define to test MathLib::value class 2015-07-16 11:14:58 +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
amai2012 0873f6d62a Merge pull request #621 from simartin/ticket_6810
Ticket #6810: Avoid infinite loop upon invalid typed enum declaration.
2015-07-15 22:28:31 +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 043c586511 Revert "appveyor: test configuration that uses both visual studio 2012 and visual studio 2013"
This reverts commit 110a4b1dac.
2015-07-15 21:09:51 +02:00
Daniel Marjamäki 110a4b1dac appveyor: test configuration that uses both visual studio 2012 and visual studio 2013 2015-07-15 21:07:21 +02:00
Alexander Mai 38ac8cd594 Fix some invalid attributes in library 2015-07-15 18:41:41 +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 177fd9c79d MathLib: make isinf and isnan more portable 2015-07-14 20:48:08 +02:00
Ameen Ali 8379b0e667 GUI: show statistics after check is done 2015-07-14 18:48:51 +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
orbitcowboy fa03a93f89 gnu.cfg: Do no require use-retval for accept(). 2015-07-14 16:16:01 +02:00
orbitcowboy c4bcd6ec4c posix.cfg: Added support for more functions. 2015-07-14 09:21:57 +02:00
orbitcowboy 862361d807 posix.cfg and gnu.cfg: Added support for more functions. 2015-07-14 09:07:47 +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 a4a866ab07 Fix Cppcheck warning about non-explicit constructor for MathLib::value 2015-07-10 21:17:17 +02:00
Daniel Marjamäki ac04541d56 MathLib: Add value class. this will allow more type-independant value handling. 2015-07-10 20:36:38 +02:00
Daniel Marjamäki f36f1e8952 MathLib: Minor tweaks. Use toDoubleNumber instead of std::atof. Only use clang workaround with clang. 2015-07-10 18:34:28 +02:00
Daniel Marjamäki 81d9c90890 Fixed Cppcheck warning caused by a redundant null pointer test. 2015-07-08 21:04:38 +02:00
Daniel Marjamäki 0dd008e068 Fixed Cppcheck warning about possible null pointer dereference 2015-07-08 16:06:35 +02:00
Daniel Marjamäki 5a9328f26a Fixed Cppcheck warning about possible null pointer dereference 2015-07-08 13:41:27 +02:00
amai2012 23402b9b44 Merge pull request #618 from simartin/simplifyEnum_code_simplification
Simplify the code handling C++0x typed enumerations.
2015-07-07 08:20:30 +02:00
Simon Martin 7bfb1fb545 Simplify the code handling C++0x typed enumerations. 2015-07-06 23:37:16 +02:00
Boris Egorov f7c6140e1a checkautovariables: Simplify some conditions 2015-07-05 17:15:13 +02:00
Daniel Marjamäki f3b4c1d0db Remove some useless casts, probably added to avoid false positives. 2015-07-04 13:19:21 +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