Daniel Marjamäki
85b73f7c24
ast: fixed hang for weird loop: 'for (each_window(list,p))'
2014-01-16 16:58:50 +01:00
Daniel Marjamäki
e72ec830ef
ast: fixed hang in for-loop handling
2014-01-16 06:45:35 +01:00
Daniel Marjamäki
141e089329
ast: different handling of for loops. create a syntax tree for whole 'f(a;b;c)'.
2014-01-15 17:32:14 +01:00
Daniel Marjamäki
1fc2c9fe79
ast: fixed syntax tree for statement enclosed in parentheses ';(expr);'
2014-01-11 15:18:39 +01:00
Daniel Marjamäki
c687933e9f
value flow: improved handling of for loops
2014-01-10 18:19:24 +01:00
Daniel Marjamäki
1be30bf022
ast: fixed handling of templates
2014-01-09 17:14:16 +01:00
Daniel Marjamäki
04cb56e070
ast: fixed trouble with 'ab=a+(b/(c))+d;' where the '(c)' could be mistaken for a cast
2014-01-08 21:49:42 +01:00
Daniel Marjamäki
7125682d1a
Fixed #5274 (TokenList: macro handling)
2014-01-03 18:53:37 +01:00
Daniel Marjamäki
e0eb000ac3
AST: Fixed problem with decrement
2013-12-27 14:40:59 +01:00
Daniel Marjamäki
5d5e347418
AST: better handling of 'sizeof(void*)'
2013-12-25 22:08:53 +01:00
Daniel Marjamäki
915cb6c757
Fixed #5261 (AST: cast not handled well (a::b&)x)
2013-12-25 21:19:28 +01:00
Daniel Marjamäki
4c44e62159
AST: Refactored CheckOther::clarifyCalculation
2013-12-24 10:07:20 +01:00
Daniel Marjamäki
35189e80f2
Uninitialized variables: Fixed false positive for '*p=..'
2013-12-12 15:33:31 +01:00
Daniel Marjamäki
771dc2e1ad
AST: Improved handling when calling function through function pointer hidden within parantheses '(a.f)(1,2)'
2013-11-27 06:17:00 +01:00
Daniel Marjamäki
3b11ee9e0e
AST: Improved handling of brackets
2013-11-25 20:58:40 +01:00
Daniel Marjamäki
94e2bf7a11
AST: Handle ({..})
2013-11-25 04:07:44 +01:00
Daniel Marjamäki
6869d0de30
AST: Handle L'x'
2013-11-20 05:57:56 +01:00
Daniel Marjamäki
673400920d
AST: Fixed 'a[1][2]'
2013-11-13 17:52:56 +01:00
Daniel Marjamäki
58d7caded1
AST: improved handling of casts
2013-11-11 16:39:34 +01:00
Daniel Marjamäki
bb746261d3
AST: Fixed crash
2013-11-10 15:51:33 +01:00
Daniel Marjamäki
b0ce42565e
AST: Added experimental new implementations for CheckAssignIf::comparison, CheckOther::checkIncorrectLogicOperator and CheckOther::checkDuplicateExpression
2013-11-07 14:38:08 +01:00
Daniel Marjamäki
dde46527f3
AST: Handle ternary operators
2013-11-04 11:44:54 +01:00
Daniel Marjamäki
de29991c11
AST: Rewrite using standard approach
2013-11-04 11:26:16 +01:00
Daniel Marjamki
9959c2866c
AST: fixed hang for ',&x..'
2013-11-03 15:05:58 +01:00
Daniel Marjamäki
bbdfd8b5c7
Make it possible to create AST, by using the --ast flag
2013-11-02 18:37:35 +01:00
Robert Reif
2de3ebcb1e
CheckIO: fixed some more false negatives. Ticket: #4964
2013-09-24 06:43:03 +02:00
Daniel Marjamäki
4a1d1ce1a1
Fixed #3471 (Unused functions: take __attribute__((constructor)) in to consideration)
2013-08-30 06:27:46 +02:00
Daniel Marjamäki
44333f316a
Added terminate() handling to get quicker response when the user wants to terminate
2013-07-24 13:06:59 +02:00
Daniel Marjamäki
e3dd51dd2b
Fixed Cppcheck warning. Method TokenList::createAst can be const
2013-06-01 15:04:37 +02:00
Daniel Marjamki
c4419ea920
AST: create possible NULL pointer dereference if tokenlist is empty. Ticket: #4630
2013-03-02 15:49:48 +01:00
PKEuS
670c4de8a9
Changed behaviour of Token::is*Op() functions:
...
- Rename Token::isOp() to Token::isConstOp() (indicating that the operator does _not_ modify the input variables)
- Create new Token::isOp(), returning true also for ++, -- and assignment operators
- Make Token::isExtendedOp() returning also true for all assignment and ++/-- operators
2013-02-28 12:50:29 -08:00
Daniel Marjamäki
d5af34331b
ast: clarify the code somewhat
2013-02-23 07:43:12 +01:00
Erik Lax
569b2ae9cd
Fixed #4505 (test/testtokenize.cpp: Assertion failed in 'make check')
2013-01-23 18:27:28 +01:00
Daniel Marjamäki
683c8adb74
TokenList: Handle #line better. Ticket: #4505
2013-01-23 07:04:45 +01:00
Erik Lax
444f80c4bb
Fixed #4505
2013-01-22 13:49:54 +01:00
Andrew C. Martin
4a73c93750
Fix compiler warnings and comment/string typos
...
- fix g++ warning:
> lib/checkother.cpp:3779: warning: comparison between signed and unsigned integer expressions
- fix suncc warning (see [everything2](http://everything2.com/title/C%252B%252B%253A+static+extern+%2522C%2522 )):
> "lib/checkmemoryleak.cpp", line 578: Warning (Anachronism): Formal argument __compar of type extern "C" int(*)(const void*,const void*) in call to bsearch(const void*, const void*, unsigned long, unsigned long, extern "C" int(*)(const void*,const void*)) is being passed int(*)(const void*,const void*).
- prefer empty() / isEmpty() over "size() > 0" (cases not caught by stlSize)
- fix word misspellings (mostly comments, a few output lines)
- Parenthesis => Parentheses (both variations were used in the codebase)
- fix typo and wording ("never alwayw") in gui/test/data/benchmark/simple.cpp's CheckOther::unsignedPositive():
```
- "An unsigned variable will never alwayw be positive so it is either pointless or "
+ "An unsigned variable can't be negative so it is either pointless or "
```
2013-01-16 07:37:07 -07:00
Reijo Tomperi
5d5f7085bf
Updating year 2012 -> 2013 to .cpp and .h files and man page.
2013-01-01 18:29:08 +02:00
Simon Kagstrom
ef28bde3e4
Fixed #4408 (Force inclusion of files (a la -include /.../ in GCC))
2012-12-27 16:52:31 +01:00
acm4me
7da155c8ba
Support for Sun Studio C++ compiler
2012-12-27 11:51:12 +01:00
Daniel Marjamäki
bca7927913
AST: generate tree from bottom and upwards
2012-12-16 11:48:19 +01:00
Daniel Marjamäki
aad3a041ad
AST: Handle function calls
2012-12-16 10:06:55 +01:00
Daniel Marjamäki
1ad9c933ec
AST: Improved handling of unary operators
2012-12-16 08:41:04 +01:00
Daniel Marjamäki
fa8e5cd7d8
AST: Simple AST. Not used in the clients. Only part of the testing for now.
2012-12-15 20:21:09 +01:00
PKEuS
95f4bb3e97
Implemented support for binary numbers ( #4113 )
2012-09-10 21:13:32 +02:00
Reijo Tomperi
7ddd564ad6
Change file encoding to UFT-8 like it is for other files.
2012-08-26 00:12:38 +03:00
PKEuS
f105bf75a6
Refactorizations in ErrorLogger:
...
- Implemented constructor for ErrorLogger::ErrorMessage that takes a callstack of tokens -> replaced duplicate code in Check and Tokenizer
- Implemented strigify() for ErrorLogger::ErrorMessage::FileLocation to replace two identical implementations of it.
2012-05-06 01:17:15 -07:00
PKEuS
1a5fbd61d2
Splitted class TokenList from Tokenizer
2012-05-05 09:33:26 -07:00