Robert Reif
59de30823e
CheckIO: This patch adds support for fprintf_s, fscanf_s and %I. Ticket: #5051
2013-10-03 06:37:40 +02:00
Robert Reif
022e7a0f0f
CheckIO: Fix INT_PTR false positive found while checking mpc-hc. Ticket: #5057
2013-10-02 04:19:04 +02:00
Martin Ettl
fa5ee8fd13
Tokenizer: simplifyMathFunctions: added more simplifications for exp(), exp2() and log2() functions.
2013-10-01 20:30:59 +02:00
Robert Reif
cc6745fef6
CheckIO: Fixed false positives when using _snprintf_s and _snwprintf_s. Ticket: #5057
2013-10-01 05:49:44 +02:00
Martin Ettl
f0cbeb5233
simplifyMathFunctions: added support for exp(),sqrt(),cbrt() functions.
2013-09-29 18:11:17 +02:00
Robert Reif
c37c6617d3
Fixed #5057 (Microsoft secure printf/scanf support.)
2013-09-30 19:55:21 +02:00
Daniel Marjamäki
f96a88ec57
Fixed #5054 (debug warnings when Variable::typeStartToken() or Variable::typeEndTypen() is not set correctly)
2013-09-29 16:01:22 +02:00
Martin Ettl
0527aefb11
Improved simplifyMathFunctions when simplifying special cases of pow(x,y)-function.
2013-09-29 15:11:09 +02:00
Martin Ettl
805d082cd1
Tokenizer:simplifyMathFunction: added support for [ll]div() functions and corresponding unittests. The simplifcation is only performed, if a division by 1 is detected.
2013-09-26 07:01:08 +02:00
Martin Ettl
ea5bcfaa35
Fixed #5040 - simplify more math functions.
2013-09-26 00:44:16 +02:00
Robert Reif
2de3ebcb1e
CheckIO: fixed some more false negatives. Ticket: #4964
2013-09-24 06:43:03 +02:00
Daniel Marjamäki
d1c9cac155
Merge pull request #170 from simartin/clang_warnings_2
...
Remove warnings emitted by clang's -Wsign-conversion
2013-09-22 20:42:10 -07:00
Simon Martin
894f537eba
Remove warnings emitted by clang's -Wsign-conversion
2013-09-22 13:22:52 +02:00
Robert Reif
5c4c397372
CheckIO: add scanf argument type checking. Floating point and integer checking is complete but string checking is incomplete and character checking is missing. Ticket #4099
2013-09-22 06:56:31 +02:00
Lucas Manuel Rodriguez
2fce3e6104
Fixed #5037 (Add missing C++ std objects and types)
2013-09-21 12:13:35 -03:00
Martin Ettl
d5f514c820
Fixed #5031 : simplify labs|fabs|abs(-1) to 1.
2013-09-21 16:59:06 +02:00
Robert Reif
489a3a6e53
Fixed #5015 (strings not being concatinated properly)
2013-09-06 05:36:33 +02:00
Daniel Marjamäki
9000c233fa
Fixed #5012 (Hang when there is syntax error 'else }')
2013-09-05 06:38:07 +02:00
Daniel Marjamäki
6819f5ed18
Fixed #4860 (Segfault with another Clucene file)
2013-09-02 05:58:55 +02:00
Robert Reif
8790f6d73f
Fixed #4999 (Crash with simple code snipped in rev ab30fa3
)
2013-08-31 18:58:55 +02:00
Robert Reif
05f2f0e419
CheckIO: improved type info - keep track of original typename.
2013-08-31 06:26:39 +02:00
Daniel Marjamäki
4a1d1ce1a1
Fixed #3471 (Unused functions: take __attribute__((constructor)) in to consideration)
2013-08-30 06:27:46 +02:00
Robert Reif
fc435ae9aa
CheckIO: fix false negative for a function in a base class not being found, fix false positives and negatives for std::vector operator []
2013-08-30 05:41:59 +02:00
Daniel Marjamäki
3bd1d53c75
Fixed #4941 (segmentation fault (invalid code) in Tokenizer::setVarId)
2013-08-28 19:52:41 +02:00
Robert Reif
a1b9bb0688
CheckIO: Fix false positives for functions returning unknown types and false negatives for functions returning record types
2013-08-26 06:03:26 +02:00
Daniel Marjamäki
acdbbeee44
Fixed #4913 (Tokenizer::simplifyKnownVariables: wrong handling of *--p=0;)
2013-08-25 08:54:33 +02:00
Robert Reif
3c6ca35e09
Fixed #4977 (improve platform type tokenize performance)
2013-08-25 08:29:24 +02:00
Simon Martin
b713a69b30
Ticket #4450 : Handle comma separated static variable declarations with initializers in brackets.
2013-08-24 22:27:54 +02:00
Robert Reif
5ce1933687
CheckIo: handle more complex variables
2013-08-23 05:35:57 +02:00
Robert Reif
bf8a786265
reduce: add more settings from cppcheck cli
2013-08-19 06:06:53 +02:00
Daniel Marjamäki
13f85ea345
astyle formatting
2013-08-17 13:06:19 +02:00
Daniel Marjamäki
fd545f90db
Merge pull request #163 from simartin/ticket_4959
...
Ticket #4959 : Simplify {in,de}crements of known variables.
2013-08-17 03:35:30 -07:00
Simon Martin
5743416d3e
Ticket #4959 : Simplify {in,de}crements of known variables.
2013-08-16 23:51:00 +02:00
Daniel Marjamäki
67c77a31aa
Fixed #4942 (1.61 is very slow (compared to 1.60.1))
2013-08-16 18:39:56 +02:00
Simon Martin
bf09191b78
Fixed #4708 : prefix {in,de}crement too eagerly computed.
2013-08-15 15:53:08 +02:00
Daniel Marjamäki
f95b29db06
Improved handling of the __FILE__ macro
2013-08-14 06:36:03 +02:00
Robert Reif
d6ce072dc9
Fixed #4950 (Tokenizer: order of int modifiers)
2013-08-12 06:23:01 +02:00
Daniel Marjamäki
64733d9e63
astyle formatting
2013-08-10 12:32:59 +02:00
Daniel Marjamäki
3ac21ab1db
Merge pull request #158 from simartin/ticket_4764
...
Ticket #4764 : Handle template instantiations with only default parameters
2013-08-10 03:22:41 -07:00
Simon Martin
ad33d95ec1
Ticket #4764 : properly handle template instantiations with only default parameters.
2013-08-10 12:00:16 +02:00
Robert Reif
b940d0adc6
Fixed #4947 (Doesn't allow any ordering of int modifiers)
2013-08-09 23:13:04 +02:00
PKEuS
a9a5dc0354
Updated to AStyle 2.03, require this version
2013-08-07 16:27:37 +02:00
Daniel Marjamäki
2a78db4c06
Refactoring Token::findClosingBracket.
2013-07-31 10:30:20 +02:00
Daniel Marjamäki
807204e580
Fixed #4237 (False positive: (error) Memory Leak: data (references and pointer aliases))
2013-07-30 11:30:14 +02:00
Lucas Manuel Rodriguez
09f4d3732a
Fixed #4911 (segfault, assignment in do ... while, 1.61dev)
2013-07-28 11:58:14 +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
37716fb8bb
Tokenizer: Set variable() pointer for array members
2013-07-20 17:46:39 +02:00
Daniel Marjamäki
dfed6bbea0
Fixed #4445 (Token::Match called with varid 0)
2013-07-19 21:18:54 +02:00
Daniel Marjamäki
6fe1b92a47
Improved --check-library messages
2013-07-16 18:50:25 +02:00
Daniel Marjamäki
b2f6e9e3eb
library: improved handling of noreturn. The Tokenizer::isScopeNoReturn will now try to use the library to determine if scope is noreturn.
2013-07-14 10:10:11 +02:00
Lucas Manuel Rodriguez
cfd697d6d4
Fixed #4042 (False Positive : Same expression on both sides of '&')
2013-07-11 07:13:47 +02:00
Simon Martin
e2deb59f8a
Improved handling of syntax errors in Tokenizer::simplifyAddBracesPair.
2013-06-29 14:05:49 +02:00
Daniel Marjamäki
c389e08353
Fixed #4728 (simplify known variables better (%var% & %num%, bitwise and))
2013-06-26 18:13:28 +02:00
Daniel Marjamäki
7dd07472c1
Fixed #4530 (Tokenizer: improved simplification of strlen in calculation)
2013-06-25 20:10:40 +02:00
Lucas Manuel Rodriguez
d6be4559cd
Fixed #4840 (false negative: buffer access out of bounds)
2013-06-25 06:37:51 +02:00
Alexander Mai
5a9975bbdd
Fixed #4869 (segmentation fault in Tokenizer::simplifyStructDecl (invalid code))
2013-06-22 14:05:49 +02:00
Daniel Marjamäki
d3d7808a06
Fixed #4834 (FreeType: incorrect array boundary analysis)
2013-06-16 15:41:13 +02:00
Daniel Marjamäki
210f2ab352
Tokenizer: refactoring; use Token::link() instead of loop
2013-06-16 15:27:59 +02:00
Daniel Marjamäki
59478c15cf
Tokenizer: small speedup
2013-06-16 09:00:02 +02:00
Daniel Marjamäki
a9bd6cf3df
Fixed #4857 (False Positive: function argument hides enumerator of same type)
2013-06-16 08:13:41 +02:00
Daniel Marjamki
03f28e9c65
Fixed #4668 (Tokenizer: improve handling of 'if (x) MACRO() { ..')
2013-06-15 14:40:05 +02:00
Daniel Marjamäki
c4763b9010
Fixed #4463 (false positive: (style) Variable 'CHDERR_NOT_OPEN' hides enumerator with same name)
2013-06-12 06:45:26 +02:00
Daniel Marjamäki
616a693f1f
Merge pull request #139 from JustRamires/master
...
Ticket #4694
2013-06-08 07:46:08 -07:00
Roman Zaytsev Borisovich
4610b135dc
Fixed #4694
2013-06-07 10:37:33 +04:00
Daniel Marjamäki
dec520c507
Tokenizer::simplifyEnum: Fixed false positives
2013-06-04 21:18:20 +02:00
Daniel Marjamäki
8b5792a0f8
Tokenizer::simplifyEnum: Fixed internalErrors when building with compiled patterns.
2013-06-04 18:57:46 +02:00
Daniel Marjamäki
fa1fd31667
Tokenizer::simplifyEnum: Improved handling of shadow variables
2013-06-04 06:51:01 +02:00
Daniel Marjamäki
8954cc0984
Fixed #4280 (Tokenizer::simplifyEnum: don't simplify shadow variables)
2013-06-03 19:18:51 +02:00
Daniel Marjamäki
ca632bd771
Fixed Cppcheck warning. Made method const
2013-06-01 14:35:21 +02:00
Frank Zingsheim
614a78084f
Fixed #4799 : Improved quickfix from 0943fecf03
...
(Segmentation fault in K&R simplification inside lambda expression)
2013-05-21 19:43:07 +02:00
Frank Zingsheim
0943fecf03
Fixed #4799 (Segmentation fault in K&R simplification inside lambda expression)
2013-05-14 20:56:31 +02:00
PKEuS
1903585ea3
Fixed bug in handling rvalue references: Scope has to be set everywhere. ( #4732 )
2013-05-14 01:43:32 -07:00
Frank Zingsheim
0076ebe08d
More general fix to #4187 (False positive: Variable inside a lambda is reported as uninitialized)
...
Travis: Problems with matchcompiler.py
2013-05-12 11:19:10 +02:00
Frank Zingsheim
511f8a4c1f
More general fix to #4187 (False positive: Variable inside a lambda is reported as uninitialized)
2013-05-12 10:19:43 +02:00
Daniel Marjamäki
cbe0a0825c
Fixed #4725 (Tokenizer: Replace block declaration (^{}) with asm())
2013-05-09 14:47:18 +02:00
Daniel Marjamäki
4659745106
Fixed #4786 (segfault with one LibreOffice file)
2013-05-06 16:56:34 +02:00
Zachary Blair
de8ee5b042
Fixed #4554 (false negative: buffer access out of bounds)
2013-05-02 21:50:48 -07:00
Daniel Marjamäki
9f8ce6f77f
Fixed #4729 (Tokenizer::setVarId: Varid not tracked properly after function declaration with 'shadow' parameter name)
2013-04-19 18:36:16 +02:00
PKEuS
cf5d8fa3df
Use Token::link() instead of Token::findClosingBracket() whereever possible
2013-04-15 13:48:28 -07:00
Daniel Marjamäki
a49fc57e00
Tokenizer: don't simplify 'a!=(b!=0)' to 'a!=b'. Ticket: #4697
2013-04-11 07:19:32 +02:00
XhmikosR
8ac9b8e7a9
remove duplicate ";" and fours dots
2013-04-09 17:49:09 +02:00
PKEuS
fd7c90f68d
Forgot to commit a file in eb2962792f
.
2013-04-04 10:57:35 -07:00
PKEuS
188096665c
Implemented support for rvalue references (C++11):
...
- Split up && when it is part of an rvalue reference declaration
- Added support into symbol database
- Current implementation sets Variable::isReference() to true also for rvalue references - they can probably be treated like normal references in many checks.
Changed behaviour of symbol database: Insert argument Variable of functions that are not implemented into SymbolDatabase::_variableList
2013-04-04 09:47:44 -07:00
Daniel Marjamäki
2d70af2c82
Reverted fix. It might be possible to make a better fix
2013-03-25 19:55:35 +01:00
Daniel Marjamäki
2b02013fa7
Fixed #4668 (False positive: uninitialized Variable after unknown macro)
2013-03-25 19:52:33 +01:00
Daniel Marjamäki
cc3139cf39
Tokenizer: Fixed 'variableScope' message.
2013-03-18 19:32:40 +01:00
Daniel Marjamäki
1b18bfc93c
Fixed #3585 (errors not recognized when class has extra specification)
2013-03-18 19:09:04 +01:00
Robert Reif
c600479c20
Symbol database: Tweaked debug printing of unknown types
2013-03-15 06:48:57 +01:00
PKEuS
796c3e101f
Implemented better fix for #4644
2013-03-12 08:05:03 -07:00
PKEuS
b3a9ac5c3b
Fixed #4644 : Don't assign varid to template parameter when 'typename' is used
2013-03-10 06:11:25 -07:00
Daniel Marjamäki
1f40af2ae2
Fixed #4637 (false positive: (error) Uninitialized member variable (missing function inlining))
2013-03-09 17:55:49 +01:00
PKEuS
99a73fe1d3
Don't assign a varid to a variadic function
2013-03-05 08:32:52 -08:00
PKEuS
d49f4a611a
Reduced code duplication in tokenizer
2013-03-02 09:19:53 -08:00
PKEuS
bf9aa102f2
Fixed possible nullptr dereference warning
2013-03-01 03:53:47 -08:00
PKEuS
0105f8223c
Simplified several Token::Match/simpleMatch calls when match string consists of a single pattern
...
Fixed two CheckInternal error messages
2013-03-01 03:42:04 -08:00
PKEuS
f899e6ca30
Changed behaviour of %op% pattern accordingly to changes to Token::isOp(). Added %cop% as replacement for old %op%
2013-03-01 02:43:59 -08: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
94da3bd57f
Fixed #4617 (False positive (style): noexcept for constructors)
2013-02-28 06:38:57 +01:00
Daniel Marjamäki
71b66209b7
Fixed #4300 (segmentation fault of cppcheck (invalid code))
2013-02-20 06:58:27 +01:00
Alexander Mai
b892d2e14c
Fixed #4300 (segmentation fault of cppcheck (invalid code))
2013-02-16 18:31:43 +01:00