Daniel Marjamäki
a500f6f703
Improved handling of 'long double' and address-of in ValueType. Removed Tokenizer::simplifyFloatCasts() to handle float casts better.
2015-10-08 19:50:10 +02:00
PKEuS
3645e3c16b
Fixed two TODO unit tests by delaying arraySize simpification until createLink2 is executed
2015-10-08 12:52:28 +02:00
Daniel Marjamäki
9b253612ca
SymbolDatabase: Add type information in AST
2015-10-04 19:42:58 +02:00
Alexander Mai
27f72d7ae0
#7020 segmentation fault (invalid code) in Tokenizer::simplifyTypedef. #7021 segmentation fault (invalid code) in Tokenizer::simplifyEnum
2015-10-03 10:47:23 +02:00
amai2012
fde59242bb
#7018 segmentation fault (invalid code) in Tokenizer::simplifyEnum
2015-10-02 15:33:23 +02:00
PKEuS
e6467703b2
Support cast to ** in Tokenizer::simplifyCasts() ( #7005 )
2015-09-28 16:08:14 +02:00
PKEuS
590f1f1d66
Fixed handling of __asm...__endasm ( #6970 )
2015-09-28 15:43:48 +02:00
Alexander Mai
c27fc31fcf
#6997 segmentation fault (invalid code) in CheckUninitVar::checkIfForWhileHead. Detect invalid syntax.
2015-09-23 10:33:55 +02:00
Dmitry-Me
074639548b
Use temp variables, better variable names
2015-09-16 15:31:13 +03:00
PKEuS
6647976d80
Simplified a few Token::Match calls
2015-09-14 08:57:23 +02:00
amai2012
7dadd9f3ca
Merge pull request #677 from Dmitry-Me/simplifySearchReplace
...
Simplify overengineered search-replace code
2015-09-11 16:02:39 +07:00
Dmitry-Me
b2cd0aabf5
Simplify overengineered search-replace code
2015-09-09 18:43:32 +03:00
Dmitry-Me
fdfddde496
Reuse cached value
2015-09-09 15:29:06 +03:00
orbitcowboy
7d229f082c
test/cfg: Improved testing of std.cfg regarding uninitialized variables.
2015-09-08 11:45:13 +02:00
Dmitry-Me
662e3c8b8c
Omit unneeded match checks
2015-09-07 18:35:15 +03:00
Daniel Marjamäki
d88dc3ed3e
Reverted 00c54df07c
(don't remove enum declarations) because it caused unexpected false positives
2015-09-06 18:37:22 +02:00
Daniel Marjamäki
00c54df07c
Tokenizer: Don't remove enum declarations
2015-09-06 17:44:49 +02:00
PKEuS
5c348890b2
Preserve varId in simplifyArrayAccessSyntax ( #6523 )
2015-09-05 13:14:08 +02:00
amai2012
e683d31e71
Re-enable okenizer::removeMacroInClassDef for C code
2015-09-01 07:10:12 +02:00
PKEuS
f12f16cb4a
Handle anonymous structs (which can appear inside unions) like anonymous unions ( #2039 )
2015-08-30 15:41:54 +02:00
Philipp Kloke
56698dd844
Fixed #6919 : Support initializer list in duplicateEnumError check
2015-08-29 22:20:09 +02:00
PKEuS
d7853b9963
Fixed simplification of fma(a, b, c) ( #6958 )
2015-08-29 20:52:03 +02:00
Alexander Mai
8d2c4453ad
Small optimizations for C code in Tokenizer. Add some regression tests for recently fixed results
2015-08-29 19:00:09 +02:00
PKEuS
70368a2e3a
Made ctor of triplet explicit, because cppcheck demands it.
2015-08-29 11:13:03 +02:00
PKEuS
d5bc3285b9
Move "extern" to the beginning of a declaration like "static" and "const"
2015-08-29 10:57:52 +02:00
PKEuS
f89205064a
Several small optimizations in tokenize.cpp
2015-08-29 10:46:51 +02:00
Daniel Marjamäki
498c920180
addons/cert.py: better handling of structs. read pragmas in the file.
2015-08-28 18:07:12 +02:00
PKEuS
2ace3d3144
Rewritten handling of declaration specifiers:
...
- Removed simplifyConst() because it did the opposite of the (superior) simplifyStaticConst()
- Execute simplifyStaticConst() in simplifyTokenList1() - there is no reason to defer it, and it is required to properly parse declarations like "unsigned static int i;"
- Fixed simplifyStaticConst() to handle more patterns. It did not work at the beginning of the token list and for function arguments
- Reimplemented Tokenizer::simplifyStdType()
-> properly support all possible ways to declare integers as requested by the standard, instead of only a few common permutations of "unsigned|signed", "short|char|long|int"
-> Fixed parsing of _Complex/complex types
2015-08-27 14:34:17 +02:00
PKEuS
37aec52399
Simplify complex/_Complex types ( #6939 )
2015-08-26 13:13:45 +02:00
PKEuS
c8c59aa92b
Removed Tokenizer::simplifyIfSameInnerCondition(). It covered only very simple patterns and is unlikely to have an impact on real-world code.
2015-08-26 13:04:00 +02:00
Simon Martin
6fb19b02d0
Properly differentiate arrays of pointers and pointers to arrays.
2015-08-25 21:19:19 +02:00
amai2012
873861df4a
#6948 cash: daca: mgetty (garbage code)
2015-08-21 10:40:43 +02:00
PKEuS
8d926d7328
Moved some simple WinAPI/MFC-specific simplifications to windows.cfg
2015-08-20 15:59:59 +02:00
PKEuS
ebae879cf9
Some small refactorizations to tokenize.cpp
2015-08-19 20:06:49 +02:00
PKEuS
11be2f79a6
Refactorization: Removed some redundant conditions and an unused syntax check from tokenize.cpp
2015-08-19 19:29:49 +02:00
PKEuS
a720153e1e
Refactorization: Removed redundant code for syntax error handling in templatesimplifier.cpp and symboldatabase.cpp
2015-08-19 19:29:48 +02:00
PKEuS
4e2d56242c
Refactorization: Removed unreachable and duplicate code in tokenize.cpp
2015-08-19 19:29:48 +02:00
Dmitry-Me
a8135d9bd8
Merge overlapping patterns
2015-08-17 17:25:19 +03:00
PKEuS
ab8afec3eb
Refactorizations:
...
- Avoid unnecessary loop iterations
- Avoid unnecessary condition checking
- Reduced code duplication in symboldatabase.cpp
2015-08-16 14:23:07 +02:00
PKEuS
1627b19dd6
Refactorizations:
...
- Call std::string::find() with char instead of char* where possible
- Avoid string copying
- Optimized several Token::tokAt/strAt calls
2015-08-16 10:33:51 +02:00
PKEuS
4d80df2f4a
Added pointer to Type to Token (similar to Token::Variable() and Token::function()):
...
- Accessible via Token::type()
- Renamed former Token::type() to Token::tokType()
- Removed SymbolDatabase::isClassOrStruct()
2015-08-15 11:19:21 +02:00
PKEuS
3cf67014ad
Fixed parsing of template in enum
2015-08-14 11:08:03 +02:00
Matthias Krüger
72b00b35f8
Tokenizer::simplifyNamespaceStd() check condition only once instead of potentially 3 times
2015-08-10 23:33:58 +02:00
Alexander Mai
a5aba110a4
Replace Tokenizer::simplifyBuiltinExpect by a suitable addition to gnu.cfg
2015-08-10 20:21:30 +02:00
Matthias Krüger
4e4a1cfe3a
Tokenizer::combineOperators: prevent duplicate checking of same condition
2015-08-09 14:35:17 +02:00
Alexander Mai
95658030bc
Avoid UB in Tokenizer::printDebugOutput in case of empty tokenlist (see #6913 )
2015-08-09 07:49:34 +02:00
Daniel Marjamäki
72706cd0b8
Fixed #6868 (Tokenizer: wrong simplification of the unlikely keyword)
2015-08-08 12:49:42 +02:00
Frank Zingsheim
7021cb2c6b
Fixed #6284 (Token::Match called with varid 0. Constants)
2015-08-02 09:11:51 +02:00
Martin Ettl
b7ea311123
Running astyle. No functional changes.
2015-08-01 12:31:16 +02:00
amai2012
b182edddda
#6909 segmentation fault (invalid code) in Tokenizer::simplifyEnum
2015-08-01 12:24:22 +02:00