PKEuS
dee5568853
Fix bug in class Token that causes recently added modulo-check to fail.
2012-04-26 16:39:16 +02:00
PKEuS
92737578ac
Refactorizations:
...
- removed unused function CheckOther::concatNames
- Replaced one indendation counter by Token::link() in checkother.cpp
- Forward declaration of Settings in threadexecutor.h
2012-04-26 15:29:39 +02:00
PKEuS
5ac7552e4e
New check: Comparision of modulo results that are always true/false.
2012-04-26 15:23:47 +02:00
PKEuS
2a2d76749e
Improve check: Check for 64-bit portability issues when returning pointers/integers
2012-04-26 13:39:19 +02:00
Ettl Martin
2848c61e88
#3344 added missing testcase
2012-04-26 13:37:13 +02:00
Ettl Martin
8494df74e6
#2540 : added missing testcase.
2012-04-26 13:16:46 +02:00
PKEuS
30e8e389a7
Fixed #2980
2012-04-26 10:58:35 +02:00
PKEuS
1e708e10d0
Fixed #2875
2012-04-26 10:35:40 +02:00
PKEuS
a4c4c66a4c
Added test case for #3466
2012-04-25 21:14:25 +02:00
PKEuS
ebf89aa229
Fixed #3725 : Associate functions with correct parent scope when definition doesn't directly follow declaration.
2012-04-25 20:52:59 +02:00
PKEuS
31a252b057
Fixed #3746 : Issue operatorEqToSelf error only if the operator takes an object of the class as argument.
2012-04-25 20:25:51 +02:00
Dirk Jagdmann
eea92d96ec
Fixed #3757 (fix command line help and manpage by replacing --max-ifdefs)
2012-04-25 19:58:34 +02:00
Daniel Marjamäki
f84a4344ae
Fixed #3754 (Tokenizer::simplifyKnownVariables: wrong for loop simplification)
2012-04-25 19:23:17 +02:00
Edoardo Prezioso
08ae15e42d
Fixed the grammar in some reportError messages in the Tokenizer class, thanks to kimmov's suggestion.
2012-04-25 15:09:46 +02:00
PKEuS
dd5e9aa454
Make use of recently implemented Token::type() functionality
2012-04-25 09:56:07 +02:00
Daniel Marjamäki
fb6c7f33f0
Fixed #3707 (Uninitialized variable with operator >> and templates)
2012-04-24 19:50:54 +02:00
PKEuS
e0a3ca0845
Refactorizations in class Token: changed handling of different types of tokens.
...
- Replace _isNumber, _isName, _isBoolean attributes by a single _type attribute (enum Token::Type), because not two of the old booleans could be true at the same time.
-> Add support for lots of different other kinds of tokens. (More precise checking of token type possible)
-> Replaced instant checking of type for Operators, etc. by a value calculated at creation time. (Faster checking)
2012-04-23 21:05:26 +02:00
PKEuS
8cbed66089
Changed relationship between templatesimplifier and tokenizer:
...
- Pass a tokenizer to templatesimplifier to reduce code duplication (Make use of Tokenizer::reportError; remove redundant TemplateSimplifier::addtoken2) and amount of arguments passed to functions
Removed ctor and dtor implementation from TemplateSimplifier: This class shouldn't be instanciated.
2012-04-23 20:45:36 +02:00
Daniel Marjamäki
6ae135124e
Tokenizer::setVarId: better handling of initializer lists
2012-04-23 18:26:27 +02:00
PKEuS
5086ae7c31
Refactorizations in CheckMemoryLeakInClass::variable
...
- Bailout for functions that are not implemented (should fix performance downgrade introduced in fb4709f
)
- Jump behind arguments
- Removed unnecessary pop_back operations - container gets destroyed after it.
2012-04-23 15:23:01 +02:00
Ettl Martin
d0b7a3514b
added unittest to fix sample code #3721
2012-04-22 17:28:27 +02:00
Daniel Marjamäki
706631f527
Fixed #3748 (False positive out of bounds with postincrement)
2012-04-22 12:22:49 +02:00
Daniel Marjamäki
d5f6cfcfa8
Tokenizer: Use new setVarId function. Removed the old one.
2012-04-22 11:36:31 +02:00
PKEuS
3d2b5a30fe
Implemented generic reportError functions in tokenizer (similar to Check::reportError) to reduce code duplication
2012-04-22 11:28:46 +02:00
Daniel Marjamäki
8c8c9d5e5b
Tokenizer::setVarIdNew: don't treat '(sizeof *p)' as a variable declaration
2012-04-22 11:06:56 +02:00
Daniel Marjamäki
d63093d9bb
Tokenizer::setVarIdNew: Fixed issue found through TestUnusedVar tests
2012-04-22 10:59:58 +02:00
Daniel Marjamäki
aeac38b673
Tokenizer::setVarIdNew: Removed test case in TestUnusedVar that fails with the new setVarId function. The new setVarId function assumes that 'static int i(a);' is a variable declaration if it's in a executable scope (it is unknown if 'a' is a type or a variable so this assumption could be wrong).
2012-04-22 10:42:55 +02:00
Daniel Marjamäki
871823e9c6
Tokenizer::setVarId: fixed problem for classes with inheritance
2012-04-22 10:38:06 +02:00
Daniel Marjamäki
e39b7f1bfd
Tokenizer::setVarIdNew: Fixed TestTokenizer::varid38
2012-04-22 10:24:19 +02:00
Daniel Marjamäki
e745d971c8
Tokenizer::setVarIdNew: Fixed test case TestTokenizer::varid27
2012-04-22 10:19:29 +02:00
Daniel Marjamäki
807f49ce83
testrunner: fixed test case when TestTokenizer::setVarIdOld is used
2012-04-22 09:56:02 +02:00
Daniel Marjamäki
b4ffb5e0cf
Tokenizer::setVarIdNew: Fixed TestTokenizer::varid39 test case
2012-04-22 09:51:00 +02:00
Daniel Marjamäki
ed6673a9aa
Tokenizer::setVarIdNew: Fixed TestTokenizer::varid44
2012-04-22 09:18:27 +02:00
Daniel Marjamäki
71050bc586
Tokenizer::setVarIdNew: fixed TestTokenizer::varid_in_class2 test case
2012-04-22 08:51:19 +02:00
Ahti Legonkov
79af6f65d7
Fixed #3699 (cppcheck hangs with 100% cpu load on parsing preprocessor code)
2012-04-22 06:49:42 +02:00
Edoardo Prezioso
8dfde7def8
Added missing testcase from previous commit.
2012-04-22 02:41:51 +02:00
Edoardo Prezioso
be5a61b794
Fixed ticket #3721 (false positive: syntax error on valid C code ( K&R function style )).
2012-04-22 01:56:40 +02:00
PKEuS
710fefeef0
Refactorizations:
...
- Replaced some indendation counters by Token::link() or usage of symbolDatabase
- Use Token::nextArgument() to jump to target parameter
2012-04-21 23:05:37 +02:00
Daniel Marjamäki
6d9b4a8032
Tokenizer::setVarIdNew: Fixed TestTokenizer::varid_operator test case
2012-04-21 19:29:24 +02:00
Daniel Marjamäki
f3cbb3f05d
TestTokenizer: Removed varid test cases that have impossible source code
2012-04-21 19:07:35 +02:00
Daniel Marjamäki
1cc256339c
Tokenizer::setVarIdNew: Fixed TestTokenizer::varid19 test case
2012-04-21 18:22:18 +02:00
Daniel Marjamäki
42a95c9202
Tokenizer::setVarIdNew: Fixed segfault when using new setVarId on invalid code
2012-04-21 18:02:26 +02:00
Daniel Marjamäki
bd60dd46d0
Tokenizer::setVarIdNew: handle special case when there is an unknown macro. Ticket #2638
2012-04-21 17:57:20 +02:00
Daniel Marjamäki
b86295fbcd
Tokenizer::setVarIdNew: Improved C++ handling. All the TestTokenizer::varidclass?? tests pass now.
2012-04-21 17:25:44 +02:00
Daniel Marjamäki
6071a5afc3
Tokenizer::setVarIdNew: Fixed varidclass9
2012-04-21 13:39:43 +02:00
Daniel Marjamäki
85b470c41b
Tokenizer::setVarIdNew: Better C++ handling (varidclass5 and varidclass13)
2012-04-21 13:11:30 +02:00
Daniel Marjamäki
1492d8990f
Tokenizer::setVarId: better C++ handling
2012-04-19 20:58:52 +02:00
Ettl Martin
2840b19fb3
removed some c++-comments within testcases ( from my last commit ). No functional change.
2012-04-19 10:15:29 +02:00
Ettl Martin
7699d5bf87
#3742 added testcases to ensure it works correctly.
2012-04-19 10:08:51 +02:00
PKEuS
af80344ab7
Refactorizations in checkclass.cpp:
...
- Removed local isVirtual implementation in checkclass.cpp, use Function::isImplicitlyVirtual instead
- Don't bailout when we see C++-style casts in checkConst
- Don't bailout for this pattern "any << member << any"
- Improved/Fixed some test cases (-> #1305 )
2012-04-18 18:51:38 +02:00