Commit Graph

7658 Commits

Author SHA1 Message Date
Daniel Marjamäki 27af1bcfd8 Fixed #7229 (Improve check; unknown evaluation order, write different message for self assignment) 2015-12-25 18:00:19 +01:00
Daniel Marjamäki 90a54b1fae Fixed #7232 (False positive unknownEvaluationOrder on id = Remap( id += 42 );) 2015-12-25 16:45:11 +01:00
PKEuS 0bdd353062 Merge pull request #744 from Dmitry-Me/useSetInsteadofList
Use set instead of list
2015-12-25 15:57:22 +01:00
Dmitry-Me 7fdbd8f0ca Use set instead of list 2015-12-25 16:19:27 +03:00
Dmitry-Me 05cb4e16fe Fix misspelled word 2015-12-25 11:51:08 +03:00
Dmitry-Me 458f0da197 Reduce variable scope, better name 2015-12-24 17:08:49 +03:00
PKEuS 940d569980 Refactorization: Removed redundant %any% patterns. 2015-12-24 14:40:48 +01:00
PKEuS 0052896c41 Merge pull request #738 from Dmitry-Me/reduceMatchCalls
Pre-check to reduce number of match checks
2015-12-24 13:48:56 +01:00
Dmitry-Me 7303790a73 Pre-check to reduce number of match checks 2015-12-24 13:07:47 +03:00
PKEuS 93cb73ebcf Merge pull request #741 from Dmitry-Me/useArrowForDereferencing
Use arrow as in surrounding code
2015-12-24 09:37:40 +01:00
PKEuS ae740e28fd Merge pull request #740 from Dmitry-Me/donClearEmptyStrings
No need to clear empty strings
2015-12-24 09:37:20 +01:00
Daniel Marjamäki 81f0597316 Fixed #3206 and #7226 (New check: Undefined execution order) 2015-12-24 09:13:20 +01:00
Dmitry-Me 1d614f2e5b Use arrow as in surrounding code 2015-12-24 10:21:48 +03:00
Dmitry-Me bd45c71d8d No need to clear empty strings 2015-12-24 10:16:58 +03:00
PKEuS 1b7f23daa5 Merge pull request #737 from Dmitry-Me/omitDeepCopy
Omit unneeded deep copy
2015-12-23 16:26:44 +01:00
PKEuS d5e9bb4323 Merge pull request #739 from Dmitry-Me/repeatedSearch
Omit repeated search
2015-12-23 16:24:50 +01:00
Dmitry-Me 3e9ef0894f Omit repeated search 2015-12-23 16:10:39 +03:00
Daniel Marjamäki 3f386af21c astyle formatting 2015-12-23 10:26:12 +01:00
Dmitry-Me 5cba4ac602 Omit unneeded deep copy 2015-12-23 10:32:59 +03:00
Dmitry-Me 398da8ea7c Cache and reuse result of expensive operation 2015-12-22 14:03:45 +03:00
Dmitry-Me 155ccecf2f Drop useless braces 2015-12-22 10:31:49 +03:00
Alexander Mai 28a625abd8 #7218 Improve performance in TokenList::validateAst(): Keep a list of 'verified' tokens during recursion check. 2015-12-19 20:36:30 +01:00
PKEuS a6b719eb10 Refactorization: Fixed true positive when self-checking cppcheck 2015-12-18 18:13:13 +01:00
Dmitry-Me 06ff877415 Typo in variable name 2015-12-18 15:46:12 +03:00
Dmitry-Me 166e2a2cb8 Extract duplicate code 2015-12-18 10:24:02 +03:00
orbitcowboy 4a3c61f031 Merge pull request #731 from Dmitry-Me/dontProceedToOuterScope
Don't proceed to outer scope once there's a match in this scope
2015-12-17 16:04:59 +01:00
PKEuS 8f22e4924c Updated AStyle to version 2.05.1
Tweaked runastyle.bat a little bit.
2015-12-17 15:53:13 +01:00
Dmitry-Me ecc2e00a38 Don't proceed to outer scope once there's a match in this scope 2015-12-17 17:31:22 +03:00
orbitcowboy bc6ae499dc Merge pull request #730 from Dmitry-Me/loopVariableNotUsed
Loop variable wasn't really used
2015-12-17 15:09:41 +01:00
Dmitry-Me 6f996142dc Loop variable wasn't really used 2015-12-17 12:54:05 +03:00
Daniel Marjamäki febe1c9c14 Merge pull request #729 from Dmitry-Me/removeRedundantCheck
Remove redundant check
2015-12-16 15:03:07 +01:00
Daniel Marjamäki bebf8ccdd5 Revert da15efb3 and 6304a4dd to fix FPs. See #7148, #7179, etc 2015-12-16 14:51:50 +01:00
Dmitry-Me 0d2edc532c Remove redundant check 2015-12-16 16:36:06 +03:00
orbitcowboy 66897a95f4 Merge pull request #727 from Dmitry-Me/fixC4706
Fix C4706 assignment within conditional
2015-12-15 10:58:14 +01:00
Dmitry-Me 4a8a5d4460 Fix C4706 assignment within conditional 2015-12-15 11:34:04 +03:00
Dmitry-Me bd4b47123a Better variable name 2015-12-15 11:30:20 +03:00
PKEuS 18693a7fce Refactorized token.cpp:
- Removed redundant overload of Token::insertToken()
- Fixed leak in Token::deleteThis()
- Moved condition out of loop in Token::tokAt()
2015-12-14 22:04:51 +01:00
Daniel Marjamäki 8f27cec991 Revert "minor tweak of comment"
This reverts commit b1d1869f22.
2015-12-14 20:29:29 +01:00
Daniel Marjamäki 9acda09fa2 refactoring. combine 2 if to 1 2015-12-14 20:05:17 +01:00
Daniel Marjamäki b1d1869f22 minor tweak of comment 2015-12-14 20:03:40 +01:00
Daniel Marjamäki 2532f94bef Merge pull request #719 from 3adev/fix-multiple-config-dumps
Fix multiple config dumps
2015-12-14 20:03:09 +01:00
Albert ARIBAUD (3ADEV) e7fdb1c825 Fix multiple config dumps
With multiple configurations, option --dump only dumps
the last configuration.

Fix it to dump every configuration.

Also update all Python addons so that they can handle
multiple-configuration dumps.

Additionally run autopep8 on addons/*.py.

The results of 'make test' before and after applying
this commit are identical.
2015-12-14 18:20:35 +01:00
Dmitry-Me 182877df88 Variable name consistent with other code 2015-12-14 17:35:32 +03:00
Daniel Marjamäki 0baad496f2 Fixed #6383 (FP shiftNegative - value converted to unsigned in function argument) 2015-12-14 10:55:23 +01:00
Daniel Marjamäki 0cc003830a Revert "Fix Compiler warnings."
This reverts commit cbb7c8b854.
2015-12-13 19:58:27 +01:00
Albert ARIBAUD (3ADEV) 58031147b2 Optimize tokenizing
Reorganize cppcheck.cpp to separate actual checking from
tokenizing and XML dumping. This implies splitting checkFile()
in three parts, checkRawTokens, checkNormalTokens() and
checkSimplifiedTokens().
2015-12-13 09:29:47 +01:00
Alexander Mai 96531d6ffe TokenList::createAst() doesn't validate itself anymore. Remove some duplicated code and fix glitch in TestGarbage::garbageCode162 2015-12-12 20:01:03 +01:00
Daniel Marjamäki 9cb8e9a07e Revert "Fixed #3923 (valueFlowForward: assignment in if should not cause bailout for code in else)"
This reverts commit 04f9b71281.
2015-12-12 16:50:02 +01:00
Alexander Mai 5b2dacb4b4 Correct travis and compiler warnings and comments 2015-12-12 16:08:52 +01:00
Daniel Marjamäki 04f9b71281 Fixed #3923 (valueFlowForward: assignment in if should not cause bailout for code in else) 2015-12-12 15:50:33 +01:00