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
Martin Ettl
08413f0112
test/cfg: Improved testing of std.cfg.
2015-08-29 00:09:33 +02:00
Simon Martin
101cebbde1
Ticket #6957 : Properly handle arrays of pointers in CheckClass::constructors.
2015-08-28 23:06:39 +02:00
Simon Martin
59abb04042
Ticket #6596 : Address of local variables can also be assigned to pointer-pointer arguments using the ptr[] syntax.
2015-08-28 20:29: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
amai2012
45bb7d5adb
Merge pull request #647 from Dmitry-Me/continueOnRuleMatch
...
Treat matches as mutually exclusive
2015-08-28 16:00:53 +02:00
orbitcowboy
b0f2351649
Merge pull request #658 from Dmitry-Me/omitMatchCall
...
Replace match call with explicit comparison
2015-08-28 14:56:35 +02:00
Dmitry-Me
962f0ee584
Treat matches as mutually exclusive
2015-08-28 15:27:56 +03:00
Dmitry-Me
0cef076f10
Prefer previous() to tokAt(-1)
2015-08-28 15:19:24 +03:00
Dmitry-Me
81613d958a
Replace match call with explicit comparison
2015-08-28 15:16:10 +03:00
amai2012
2b17a5bcee
Merge pull request #656 from simartin/ticket_6953
...
Ticket #6953 : Fixed flawed logic in PR#650.
2015-08-28 06:01:13 +02:00
Simon Martin
c78d99dc07
Ticket #6954 : Properly handle pointers to arrays in CheckUnunsedVar.
2015-08-27 23:56:26 +02:00
Simon Martin
2e2f9facf5
Ticket #6953 : Fixed flawed logic in PR#650.
2015-08-27 23:35:22 +02:00
Daniel Marjamäki
436d7b6d59
Merge pull request #655 from Dmitry-Me/explicitConstCastBetterNames
...
Use const_cast to add const, better variable name
2015-08-27 17:04:07 +02:00
Dmitry-Me
c760ccee13
Use const_cast to add const, better variable name
2015-08-27 17:14:33 +03:00
PKEuS
72b918e704
Merge pull request #654 from Dmitry-Me/eliminateDuplicateCheck
...
Eliminate duplicate find() calls
2015-08-27 14:40:33 +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
Dmitry-Me
ca75096141
Eliminate duplicate find() calls
2015-08-27 11:19:51 +03:00
PKEuS
39dd71e49b
Merge pull request #653 from Dmitry-Me/reduceVariableScope
...
Reduce variable scope
2015-08-26 14:08:10 +02:00
Dmitry-Me
346f04098c
Reduce variable scope
2015-08-26 14:48:19 +03:00
PKEuS
7bb79562e9
Skip inner classes in CheckAutoVariables::returnReference() ( #6951 )
2015-08-26 13:31:51 +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
PKEuS
6b4a0a5ed7
Merge pull request #652 from Dmitry-Me/mergeIdenticalMAtches
...
Merge identical matches
2015-08-26 11:38:50 +02:00
Dmitry-Me
77317c3373
Merge identical matches
2015-08-26 10:43:15 +03:00
Simon Martin
6fb19b02d0
Properly differentiate arrays of pointers and pointers to arrays.
2015-08-25 21:19:19 +02:00
Simon Martin
8beb95e179
Fix CheckClass::checkMemset for arrays of pointers.
2015-08-23 19:57:58 +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
Daniel Marjamäki
13cf6be40b
dump: use toxml for function names to handle operator& etc
2015-08-18 15:39:15 +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
ee4a5843bb
Some small refactorizations
2015-08-15 19:46:31 +02:00
PKEuS
1a266315f1
Removed some unused code
2015-08-15 19:17:25 +02:00
Daniel Marjamäki
7bb9d2d2f3
minor tweak. use isNotLibraryFunction in Library to prevent false matches
2015-08-15 16:48:30 +02:00
PKEuS
b77912a0b5
Support namespaces in CheckOther::checkIgnoredReturnValue()
2015-08-15 12:19:14 +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
Daniel Marjamäki
7ede9de502
Removed unused code. The isVariableUsed is used instead.
2015-08-15 07:43:39 +02:00
Alexander Mai
8b433fa053
Add regression test for #6299 . Fix clang compiler warning due to doxygen comment
2015-08-14 18:27:03 +02:00
PKEuS
a297a03b64
Fixed false positive #6787 : Skip over lambdas in CheckAutoVariables::returnReference()
2015-08-14 13:03:07 +02:00
PKEuS
b0bf69bae7
Fixed false positive #6763 and reordered conditions
...
Ran AStyle
2015-08-14 12:50:45 +02:00
PKEuS
3cf67014ad
Fixed parsing of template in enum
2015-08-14 11:08:03 +02:00
Daniel Marjamäki
e578988832
invalidScanf: removed the checking for 'scanf crash with huge input data for old glibc'. new systems are not vulnerable to this bug anymore.
2015-08-14 08:03:46 +02:00
Dmitry-Me
769d8e713d
Eliminate repeated lookup, better variable names
2015-08-13 16:10:23 +03:00