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
PKEuS
b8d39a2229
Refactorizations:
...
- Improve performance of simplifyTypedef by using Token::simpleMatch by ~15%
- Simplified code in simplifyTypedef
- Ran AStyle
2015-12-02 23:32:50 +01:00
PKEuS
7ea9e3ca4f
Refactorization: Improve performance of simplifyTypedef by adding a pre-check for Token::link() by ~25%
2015-12-02 22:41:09 +01:00
Alexander Mai
f762affea0
Small refactoring: replace NULL by nullptr, remove redundant static keyword, Tokenizer::setVarId() uses const variable 'notstart'
2015-11-30 22:13:49 +01:00
Daniel Marjamäki
8a9e068129
Fixed #7119 (Cppcheck hangs with 100% CPU load in Tokenizer::copyTokens (invalidcode))
2015-11-29 14:56:15 +01:00
PKEuS
e8522c7883
Small refactorizations:
...
- #include cleanup
- Use std::array instead of std::vector
- Do not create a stringstream to concatenate 4 strings
- Use std::cout instead of printf
2015-11-29 10:56:44 +01:00
Daniel Marjamäki
8bb8290a6f
Fixed GCC warnings. unused variable, shadow variable.
2015-11-28 18:15:47 +01:00
PKEuS
93c02ce826
Fixed compiler error introduced in previous commit and several MSVC warnings
2015-11-28 10:49:08 +01:00
Daniel Marjamäki
6b124a37d8
Cleanup some casts
2015-11-28 10:11:07 +01:00
Daniel Marjamäki
c0da6c1541
simplifyCalculations: handle '(4%1<<1&4!=1)' better. must combine '!' '=' before constant folding. fixed the operator precedence for comparison operators. ( #4931 )
2015-11-28 09:04:22 +01:00
Alexander Mai
44305fd98e
#6940 Unsigned overflow in TestBufferOverrun::negativeArraySize. Don't try to calculate size of array with negative array size
2015-11-28 07:27:52 +01:00
Daniel Marjamäki
2737f63f71
Wrong calculation of constants (simplifying: +,<<,% operations)
2015-11-25 16:46:39 +01:00
Daniel Marjamäki
5135bae777
Tokenizer: Cleanup the Tokenizer::tokenizeCondition used by the preprocessor
2015-11-23 16:53:30 +01:00
Daniel Marjamäki
8fd62e0cf9
Fixed #4931 (Wrong calculation of constants (simplifying: +,<<,% operations))
2015-11-20 19:43:11 +01:00
Daniel Marjamäki
4abc0b7c1f
Partial fix for #4931 (Wrong calculation of constants (simplifying: +,<<,% operations))
2015-11-20 16:09:47 +01:00
PKEuS
00bdc89f98
Refactorizations:
...
- Rely on SymbolDatabase to detect string types
- Loop over variable list instead of token list
- Fixed two comments claiming that the AST is experimental
2015-11-20 11:20:42 +01:00
Daniel Marjamäki
40851a12ef
Fixed #4627 (Tokenizer::setVarId: function declaration in function body)
2015-11-19 16:27:16 +01:00
PKEuS
e990cfb76b
Fixed setVarId() for destructors
2015-11-18 21:13:58 +01:00
Daniel Marjamäki
0f9d90d2be
Changed Copyrights. Removed my name.
2015-11-18 20:04:50 +01:00
PKEuS
3f255e7685
Use Library information in Tokenizer::sizeOfType()
2015-11-15 14:37:02 +01:00
Alexander Mai
835c234e18
#7131 crash: Tokenizer::setVarId()
2015-11-14 21:22:53 +01:00
PKEuS
f9bc229d4b
Support varids in nested classes that are declared outside of outer class ( #7127 )
2015-11-13 10:07:57 +01:00
PKEuS
ee00925dc5
setVarId: Support throw() in constructor implementations ( #7123 )
2015-11-11 11:01:49 +01:00
PKEuS
03d52de74b
Treat "class" keyword similar to "struct" or "union" on C++ code ( #6696 )
2015-11-10 17:03:27 +01:00
PKEuS
cc9a1f4375
Fixed setVarId() for template in initializer list ( #7122 )
2015-11-10 16:14:53 +01:00
PKEuS
feae241fc0
Fixed simplification of pointers ( #6829 )
2015-11-10 14:45:24 +01:00
PKEuS
5cd36d6f8a
Refactorization: Use varid instead of variable name in CheckClass::initializeVarList() and fixed issue in setVarId().
...
Fixed internal warning.
2015-11-09 23:00:14 +01:00
PKEuS
49a9b011eb
Fixed handling of this-> and (*this). in setVarId()
2015-11-09 21:43:40 +01:00
Alexander Mai
ab296fa93f
7111 segmentation fault (invalid code) in Tokenizer::simplifyRedundantParentheses
2015-11-08 13:45:55 +01:00
Daniel Marjamäki
3655ce7222
Fix typo in match pattern
2015-11-07 16:06:37 +01:00
Daniel Marjamäki
f7a7a8a95c
Fixed #6934 (False positive returnLocalVariable - assigning local array to function argument)
2015-11-07 15:07:26 +01:00
PKEuS
0ac89c8af2
Fixed internal warning
2015-11-06 22:21:39 +01:00
Aleksandr Pikalev
2d0ecc08c1
Check pointers for NULL before utilizing and do not check it later
2015-11-06 20:24:09 +01:00
PKEuS
7a90b763f6
Tokenizer::simplifyLabelsCaseDefault(): Do not insert ; between two cases.
2015-11-06 19:59:23 +01:00
PKEuS
95a0c0f14c
Limit the number of cases created by Tokenizer::simplifyCaseRange().
2015-11-06 19:21:56 +01:00
PKEuS
1fe1d7ea4a
Extended Tokenizer::simplifyCaseRange() to support also ranges of chars.
2015-11-06 18:46:43 +01:00
PKEuS
41b1b9d850
Support case ranges (gcc extension, #6490 )
2015-11-06 18:39:03 +01:00
PKEuS
2ac8da0497
Fixed #6548 also for noexcept
2015-11-06 18:00:59 +01:00
PKEuS
72bc6d1f33
Refactorization: Fixed VS warning about variable shadowing.
2015-11-06 17:35:08 +01:00
PKEuS
62bc827eb0
Fixed createLinks2() when inheriting from a template ( #6601 )
2015-11-06 10:44:37 +01:00
Alexander Mai
3177d73fb0
#7089 segmentation fault (invalid code) in Tokenizer::simplifyTokenList1. Refactor some functions to accept argument as refernce instead of pointer
2015-11-05 19:00:08 +01:00
PKEuS
83a816b109
Fixed crash on garbage code ( #7085 )
2015-11-04 10:26:55 +01:00
PKEuS
6c20f4b2a2
Fixed crash on garbage code ( #7090 )
2015-11-04 10:10:20 +01:00
PKEuS
8374e8414b
Fixed use-after-free in clang test suite introduced recently ( #7087 )
2015-11-03 19:24:19 +01:00
PKEuS
b97f9e576d
Fixed crash in clang test suite introduced by previous commit.
2015-11-02 22:53:05 +01:00
PKEuS
b049050792
Fixed wrong parsing of ^{}
2015-11-02 22:14:41 +01:00
PKEuS
4f565ba90f
Fixed crashs on garbage code ( #7082 )
2015-11-02 21:30:28 +01:00
PKEuS
23e6e5a568
Fixed crash on garbage code ( #7081 )
2015-10-31 18:11:56 +01:00
PKEuS
a0ff992c4a
Refactorization: Simplified Tokenizer::simplifyAddBracesToCommand() and Tokenizer::simplifyAddBracesPair()
2015-10-27 20:04:34 +01:00