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
Simon Martin
6fb19b02d0
Properly differentiate arrays of pointers and pointers to arrays.
2015-08-25 21:19:19 +02:00
PKEuS
8d926d7328
Moved some simple WinAPI/MFC-specific simplifications to windows.cfg
2015-08-20 15:59:59 +02:00
PKEuS
0babc4f38f
Moved some unit tests to testgarbage.cpp
2015-08-16 14:49:35 +02:00
Alexander Mai
b3cc4629a6
Remove obsolete tests. Add incomplete test for GNU __builtin_expect to gnu.c
2015-08-10 21:20:20 +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
Alexander Mai
acf050793e
#6907 segmentation fault (invalid code) in Tokenizer::simplifyTokenList1
2015-08-01 07:39:56 +02:00
Matthias Krüger
83ee640977
Tokenizer::syntaxError: put the character that we have an invalid number of into singlequotes instead of parentheses.
2015-07-31 15:28:59 +02:00
Daniel Marjamäki
05a21d45eb
Fixed #6670 (Analysis failed when there are {} in LHS in compound assignment)
2015-07-27 13:44:35 +02:00
Daniel Marjamäki
35eb1a393d
AST: handle concatening of strings better. this is not ideal but better.
2015-07-27 13:13:30 +02:00
Simon Shanks
9910c1fa0c
Fixed #6617 (preprocessor performance improvement)
2015-07-24 13:30:41 +02:00
Daniel Marjamäki
8ffa917fa2
Fixed #6863 (AST: wrong handling of assignment between ? and :)
2015-07-24 13:02:00 +02:00
Daniel Marjamäki
f9d22f70db
Removed simplifyIfNot simplification ( #6072 )
2015-07-21 20:56:47 +02:00
Daniel Marjamäki
1b8252181d
Tokenizer: Removed Tokenizer::simplifyIfNotNull ( #6072 )
2015-07-21 17:58:44 +02:00
Daniel Marjamäki
8a72bb8aa8
AST: Fixed AST for struct initialisation
2015-07-21 11:40:42 +02:00
PKEuS
149d11d9ad
Improved handling of inline assembly ( #6813 ):
...
- Add ; after asm {} block if required
- Fixed inline suppressions
2015-07-20 23:09:54 +02:00
Alexander Mai
8b97f04de4
Try to address some Coverity issues. Add TODO testcase for #5783 . Introduce TODO_ASSERT macro.
2015-07-19 15:03:35 +02:00
Daniel Marjamäki
a884362817
Fixed #6752 (wrong AST when there is lambda function)
2015-06-17 19:32:44 +02:00
orbitcowboy
06e818f89d
Running astyle, no functional change.
2015-06-17 09:09:23 +02:00
amai2012
a8db00b4bf
Repair test which had to be adjusted after previous changeset.
...
Refactoring: Add some const
2015-06-16 22:45:33 +02:00
Alexander Mai
70ba6c4340
#6767 False positive: memory leak when variable name is 'new'. Fix handling of new in C code. Move some tests for TokenList to new testtokenlist.cpp
2015-06-14 15:49:49 +02:00
Frank Zingsheim
6857dbe864
#6729 Simplification reference to constants.
2015-06-01 10:00:03 +02:00
Simon Martin
85b47636dc
Simplify known variableswhen they are at the end of a statement.
2015-05-30 23:34:50 +02:00
Simon Martin
50e5595845
Ticket #6708 : Check that a function name is not a reserved keyword in SymbolDatabase::isFunction instead of later.
2015-05-26 00:28:08 +02:00
Alexander Mai
7416d6add9
Another fix for handling of final/override specifiers in Tokenizer::simplifyKeyword() including a testcase. Ran astyle
2015-05-23 20:51:15 +02:00
Simon Martin
67eab0cd7c
Ticket #6620 , #6685 : Reserved keywords cannot be function names.
2015-05-23 11:29:58 +02:00
Alexander Mai
f0bc300198
#6510 False positive performance warning for std::list::size(). Fix this and other similar false positives. Refactoring of Variable::isStlType(), use fail-safe std::set instead of plain array. Run astyle
2015-05-17 20:02:41 +02:00
amai2012
20842fb1fc
#6690 override and final qualifiers plus less than operator results in a syntax error
...
Tokenizer::simplifyKeyword() is now able to handle all combinations out
of const|final|override
2015-05-17 13:02:13 +02:00
PKEuS
77c5381612
Support C++14 [[deprecated]]
2015-05-10 12:36:28 +02:00
Alexander Mai
8fa7b13a18
#6659 heap user after free: kernel: sm750_accel.c. Add testcase.
2015-05-10 11:37:23 +02:00
orbitcowboy
785df82513
#6660 : Fixed crash in Tokenize::SetVarid().
2015-04-29 09:18:54 +02:00
PKEuS
c4ceb97cea
Fixed #6629 : Don't simplify sinf(0) if sinf is a variable
2015-04-13 20:37:07 +02:00
PKEuS
c2ccd7d9e4
Simplify _declspec like __declspec
2015-04-11 11:02:52 +02:00
PKEuS
42673255ed
Refactorized testrunner: Create std::string only where necessary
2015-03-15 12:36:40 +01:00
PKEuS
bc5132e0ac
Refactorization: Moved declaration of errout, ... to testsuite.h, uniformized style
2015-03-11 22:54:43 +01:00
Simon Martin
9c6a625f91
Ticket #6181 : Normalize '>>' into '> >' when it's closing a C++11 template parameter list.
2015-03-07 11:06:04 +01:00
Daniel Marjamäki
f705cdce72
Fixed #6556 (Tokenizer::simplifyVarDecl: doesn't simplify template variables properly)
2015-03-06 17:30:20 +01:00
Daniel Marjamäki
925f077b8a
Fixed #6110 (TemplateSimplifier::simplifyCalculations: wrong simplification of 'if (VG_(strlen)(s)>=3)')
2015-03-02 16:27:00 +01:00
Daniel Marjamäki
86cdc8e7a6
Fixed #6540 (Tokenizer::simplifyKnownVariables: Missing varid for simplification in conditional code)
2015-03-02 06:18:00 +01:00
Daniel Marjamäki
449b88aa0c
Fixed #6547 (Regression - unknown macro causes analysis error)
2015-02-28 11:09:39 +01:00
Daniel Marjamäki
d4fa656e58
Refactor and improve Tokenizer::sizeofAddParentheses
2015-02-22 13:38:06 +01:00
Daniel Marjamäki
e251a99817
AST: fix handling of sizeof. ticket #6515
2015-02-18 19:56:13 +01:00
Simon Martin
c4c46be972
Revert fix for #6181 , that caused #6354 and #6414 .
2015-02-14 12:29:05 +01:00
Daniel Marjamäki
78b711fd7b
astyle formatting
2015-02-01 14:50:51 +01:00
PKEuS
f78744ac30
Fixed AST generation if expression starts with ternary operator
2015-02-01 14:02:19 +01:00
PKEuS
21cb0cfd60
Take simplifyIfNotNull and simplifyIfNot out of simplifyTokenList1 (first step for #6072 )
2015-01-31 20:12:02 +01:00
PKEuS
b2835051df
Refactorization: Renamed Token::Match pattern %var% to %name%, implement new pattern %var% which is true if varId > 0.
2015-01-31 12:32:04 +01:00
Martin Ettl
fab34a8382
Fixed a few inconclusive warnings regarding const-correctness in cppcheck code base.
2015-01-20 16:50:16 +01:00