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
Alexander Mai
9a847d7b14
#7208 Cppcheck hangs with 100% CPU load in CheckOther::checkNegativeBitwiseShift (invalidcode). TokenList::validateAst() is running consistency checks on AST
2015-12-12 15:39:38 +01:00
PKEuS
51bb76c5b5
Optimization: Skip over expression in brackets in Tokenizer::isFunctionParameterPassedByValue()
2015-12-10 15:53:14 +01:00
PKEuS
37572dc109
Small refactorizations:
...
- Improved formatting of unhandled-char-constant message (Side-effect: fixes #7206 )
- Replace nr="-1" by nr="any" in windows.cfg
2015-12-10 15:47:46 +01:00
Daniel Marjamäki
61da95010c
Removed unused CppCheck::replaceAll()
2015-12-10 13:32:36 +01:00
Daniel Marjamäki
1f16e72b19
Removed --debug-fp. The reduce tool should be used instead.
2015-12-10 10:44:36 +01:00
Akhilesh Nema
932f6ea81b
Cppcheck hangs with 100% CPU load in TemplateSimplifier::checkComplicatedSyntaxErrorsInTemplates (invalidcode)
2015-12-09 14:00:40 +01:00
Dmitry-Me
28bf944d81
Remove redundant checks
2015-12-09 11:10:56 +03:00
orbitcowboy
eead6862cc
Merge pull request #718 from Dmitry-Me/cacheAndReuse3
...
Cache and reuse value
2015-12-08 15:07:59 +01:00
Daniel Marjamäki
e88a1b0915
astyle formatting
2015-12-08 14:23:26 +01:00
Dmitry-Me
f96484b609
Cache and reuse value
2015-12-08 10:36:03 +03:00
Albert ARIBAUD (3ADEV)
b8dd71c577
Factorize toxml() into a single member function
...
lib/symboldatabase.cpp and lib/tokenize.cpp both
define a static toxml() function. Make it a single
static ErrorLogger::toxml() member function.
2015-12-07 18:21:01 +01:00
Akhilesh Nema
ca3c19c63d
GUI: Fixed compiler warnings
2015-12-07 11:24:54 +01:00
PKEuS
57e9954390
Merge pull request #715 from Dmitry-Me/eliminateRepeatedLookup3
...
Remove repeated lookup
2015-12-07 10:47:37 +01:00
amai2012
7129b1c5b3
Merge pull request #716 from Dmitry-Me/betterVariableName7
...
Better variable name
2015-12-07 10:35:34 +01:00
Dmitry-Me
67f0301f0b
Better variable name
2015-12-07 12:21:17 +03:00
Dmitry-Me
f00a73f1a1
Remove repeated lookup
2015-12-07 11:57:04 +03:00
Alexander Mai
26b699fd30
Fix compiler warnings about incomplete handling of library error codes
2015-12-06 12:52:49 +01:00
Alexander Mai
9d8dffbd79
#6269 false positives in case of overloaded standard library functions. Detect memset() with proper argument cound, using new function numberOfArguments()
2015-12-06 12:50:05 +01:00
PKEuS
eb27d3b877
Refactorization: Moved condition out of loop and ran AStyle
2015-12-06 10:40:22 +01:00
Alexander Mai
98f2cd021e
#7199 SymbolDatabase::validate() should be run in debug mode and print debug messages. In turn correct some test examples with invalid code.
2015-12-06 08:14:04 +01:00
Alexander Mai
5cf923d091
Don't run SymbolDatabase::validate on --debug. Replace some NULL by nullptr
2015-12-05 21:07:03 +01:00
Alexander Mai
ba0859e838
#6981 crash in checkvaarg.cpp (with possible fix). Avoid segfault. Add SymbolDatabase::validate() to allow validating smyboldatabase
2015-12-05 20:55:26 +01:00
Alexander Mai
5ddc5c0798
#7187 internal error; unhandled char constant \e. Support \e char literal support by clang,gcc,tcc
2015-12-05 18:53:03 +01:00
Alexander Mai
86c9387987
#7182 crash: CheckMemoryLeak::functionReturnType()
2015-12-05 18:43:29 +01:00
Alexander Mai
e69377d5a8
#7183 CheckClass::checkMemset() uint overflow. Plus some minor refactoring
2015-12-05 18:22:01 +01:00
Alexander Mai
6ae1533cb4
#7190 Cppcheck hangs with 100% CPU load in Tokenizer::simplifyAttribute (invalidcode). Call validate() once more in Tokenizer::simplifyTokenList1 to trigger invalid code exception
2015-12-05 13:55:33 +01:00
PKEuS
308fd1ba50
Fixed false positive 'noCopyConstructor' for static member variable ( #7198 )
2015-12-04 18:26:49 +01:00
PKEuS
46d6623182
Refactorization: Improved performance of Tokenizer::isFunctionParameterPassedByValue()
...
- Skip it for C code
- Improved performance by around 80% on C++ code (3,5% of entire runtime)
2015-12-03 14:44:59 +01:00
PKEuS
70767a30c4
Small refactorizations:
...
- Avoid calling c_str() for functions that take std::string
- Avoid copying std::list
2015-12-03 14:19:30 +01:00
Daniel Marjamäki
7f4dae8de4
Merge pull request #714 from Dmitry-Me/betterVariableNames
...
Better variable names, more linear code
2015-12-03 13:46:28 +01:00
PKEuS
32e2fb2f78
Refactorization: Prefer Token::simpleMatch over Token::Match also for non-const patterns.
2015-12-03 13:04:55 +01:00
PKEuS
00662ec484
Refactorization: Improve performance of simplifyTypedef by using Token::simpleMatch by ~15% (forgotten in b8d39a2229
)
2015-12-03 12:50:42 +01:00
Dmitry-Me
cb84b88cb1
Better variable names, more linear code
2015-12-03 14:20:46 +03:00