Dmitry-Me
0fe82335ac
Remove duplicated method call
2017-09-15 00:53:44 +03:00
Dmitry-Me
37dea8a5cf
Only check the value if it wasn't surely set by previous code
2017-09-12 23:20:07 +03:00
Dmitry-Me
9ff04b4df1
Resolve CID 1368512
...
Wrong pointer was being checked
2017-09-11 23:50:42 +03:00
Dmitry-Me
988de6422e
Omit repeated computations
2017-09-11 18:36:44 +03:00
Dmitry-Me
68f6cad2aa
Omit repeated search when no insertion occurs
2017-09-06 18:02:27 +03:00
Dmitry-Me
66524ef645
Clarify code using temporary
2017-09-06 18:00:23 +03:00
Dmitry-Me
c29f16a306
Cache and reuse values
2017-09-04 17:55:45 +03:00
Hinterwaeldlers
8aa568f085
Corrected noexcept constructor delegating handling ( #948 )
2017-09-02 22:54:23 +02:00
Dmitry-Me
7bd3dc5da6
Simplify array access with references
2017-08-28 18:19:03 +03:00
Dmitry-Me
7d19d1ea2e
Better use of temporary
2017-08-28 18:15:15 +03:00
Ayaz Salikhov
b8cd7dbb5c
Use nullptr instead of 0 or NULL ( #936 )
2017-08-09 20:00:26 +02:00
Daniel Marjamäki
32422c815b
Fix issue found by Coverity, scope cant be null since scope is dereferenced on all paths before the while and also unconditionally inside while
2017-08-02 08:17:29 +02:00
Daniel Marjamäki
55aec0ef1b
Fix issue detected by Coverity, vt2 is null checked and then dereferenced
2017-08-02 07:48:11 +02:00
Daniel Marjamäki
1758c3b4e7
Fix suspicious code found by Coverity, dont check if scope->function is null and then dereference it
2017-08-01 13:26:35 +02:00
Robert Reif
354a773bfe
Fix #8020 (ValueType: no value type for iterator + constant)
2017-07-16 11:27:32 -04:00
Daniel Marjamäki
fabe07ffd6
Merge pull request #924 from IOBYTE/master
...
Fixed #6985 (SymbolDatabase: Function pointer not set when calling bas…
2017-07-16 14:04:25 +02:00
Robert Reif
b0aec042a6
Fixed #6985(SymbolDatabase: Function pointer not set when calling base class function)
...
Use using namespace when looking up types.
2017-07-15 19:14:15 -04:00
Daniel Marjamäki
ea598d5284
refactoring, use early return
2017-07-09 13:09:36 +02:00
Daniel Marjamäki
211d8c6020
Refactoring checking for unused variables (avoid FN when not taking address)
2017-07-01 22:45:51 +02:00
Ayaz Salikhov
28aa939d69
iwyu - include what you use
2017-05-27 04:33:47 +02:00
amai
45ba1ff1e3
#8079 SymbolDatabase::createSymbolDatabaseEnums() crashes on invalid enum declaration
2017-05-25 09:50:14 +02:00
PKEuS
68d77b73da
SymbolDatabase: Fixed parsing of unnamed arguments, properly detect pointers ( #8052 )
2017-05-07 09:03:58 +02:00
Robert Reif
e2bfe1c0ec
Fixed #8044 : Crash below SymbolDatabase::setValueType
2017-05-01 14:12:50 -04:00
IOBYTE
8a668aa860
Add missing else that could cause an extra try scope to be added to the scope list ( #8025 )
...
Add an optional extended description…
2017-04-30 08:58:41 +02:00
Garrett Bodily
ddfd4c6348
Write access type of functions and variables to xml dump
2017-04-29 07:18:16 +02:00
Robert Reif
964b744c96
Fixed #7990 (crash: SymbolDatabase::printOut())
2017-04-29 07:02:49 +02:00
Robert Reif
78ad9825af
Add support for auto variables in regular for loop.
2017-04-21 15:25:02 -04:00
Robert Reif
0ff8e49b69
Add support for auto variable initialized from function return type.
2017-04-20 15:22:57 -04:00
Robert Reif
69d18d9c29
Fix #7963 : crash; Variable::setFlag ; gecko-dev , dom/canvas/WebGLTransformFeedback.cpp
2017-04-20 10:03:29 -04:00
Daniel Marjamäki
4f64e67298
Misra: Add rule 8.11
2017-04-17 07:45:27 +02:00
Daniel Marjamäki
1045ece946
dump: refactor valueType dump
2017-04-16 09:11:20 +02:00
Robert Reif
bcf0c5f010
Add ValueType and auto type information to debug output.
...
Print out ValueType for variables and function return type.
Print out complete type for variables and function return type.
Print out ValueType for variable auto token.
2017-04-07 19:57:10 -04:00
Daniel Marjamäki
fd2651909c
Fixed #7978 (ValueType: container type not set properly)
2017-04-06 07:07:20 +02:00
Daniel Marjamäki
fee86b9684
ValueType: Better handling of 'new Container'
2017-04-05 22:05:29 +02:00
Daniel Marjamäki
b7dcdc00d0
Fixed #7970 (ValueType: no types set below 'new std::string')
2017-04-01 22:22:37 +02:00
Daniel Marjamäki
1dbf485e02
Fix Cppcheck warnings. Remove redundant null pointer check.
2017-04-01 10:51:45 +02:00
PKEuS
ea215c3b7b
Fixed false positives in CheckClass::checkConst() due to unmatched function overloads
...
Fixed function matching if constness mismatches
2017-04-01 10:19:32 +02:00
Daniel Marjamäki
164df2aa7b
Fixed #7966 (ValueType: wrong type for gcc initialization {[1]=..})
2017-03-31 09:41:38 +02:00
Daniel Marjamäki
2da3123db2
Fix ValueType. The '[' in variable declaration is not a dereference.
2017-03-30 11:01:29 +02:00
IOBYTE
7cae057615
Add missing varid or variable for member variables.
...
Add an optional extended description…
2017-03-30 10:07:58 +02:00
PKEuS
3c8f5b85ae
Refactorization: Allocate Token::_values (ValueFlow information) dynamically, reducing size of each token by around 10%
2017-03-27 18:48:34 +02:00
Robert Reif
c96e8daebc
Don't change varid of member variables.
2017-03-25 10:59:35 -04:00
PKEuS
f4c0ab5dd5
SymbolDatabase: Match function overloads by using ValueType information by running a second pass of the function pointer assignment routine.
2017-03-24 12:19:29 +01:00
Robert Reif
bc87e874e9
Add variable and type information for auto and auto variables in range based for loops of containers.
2017-03-23 20:14:49 -04:00
Robert Reif
7adfb6e0e4
Add variable and type information to tokens for C array range based for loops.
2017-03-23 19:48:20 -04:00
Robert Reif
662bc6f846
Add variable or type information to auto and auto variable tokens. Changing the auto variable type requires rerunning the variable pointer pass to correct the symbol database for the new type.
2017-03-22 22:09:40 -04:00
Robert Reif
f099c6a110
Refactor symbol database value type support by making setValueTypeInTokenList and setValueType member functions of SymbolDatabase. Class variables are no longer passed around as parameters but accessed directly which simplifies the code. There should be no functional change.
2017-03-21 21:55:22 -04:00
PKEuS
7c0aa4464c
Fixed travis build by replacing Token::Match by simpleMatch()
...
Added missing files to cppcheck.vcxproj.filters
2017-03-16 21:15:10 +01:00
PKEuS
8a3fb4dd6c
SymbolDatabase: Fixed return type token detection for template member functions ( #7945 )
2017-03-16 20:47:24 +01:00
PKEuS
c638180753
Fixed crash in clang test suite introduced in b27ba72fdd
2017-03-15 19:22:42 +01:00
PKEuS
bcba27fbb9
SymbolDatabase: Removed unnecessary bailout in function matching for pointers in function overload matching
2017-03-15 18:45:33 +01:00
PKEuS
b27ba72fdd
SymbolDatabase: Support function overload matching for member variables ( #7932 )
2017-03-15 18:37:22 +01:00
Daniel Marjamäki
e560ad1616
update std::string config
2017-03-05 18:19:49 +01:00
Daniel Marjamäki
6c1096bf71
ValueType: First change to handle 'for (auto i : container)'
2017-03-05 15:40:29 +01:00
Daniel Marjamäki
ab7cf5d215
ValueType: set ValueType for method that returns iterator
2017-03-05 14:53:32 +01:00
Daniel Marjamäki
fa7501d3a5
ValueType: stl variables should now be handled
2017-03-05 10:33:17 +01:00
Daniel Marjamäki
f3c0461001
ValueType: handling scoped types in 'new ...'
2017-03-05 10:24:51 +01:00
Daniel Marjamäki
e0dd0a82ed
ValueType: refactor and improve handling of 'new ...'
2017-03-05 10:02:47 +01:00
Robert Reif
e02b2c4483
ValueType: handle new nothrow
2017-03-05 02:13:00 +01:00
Daniel Marjamäki
115ea08544
ValueType: Allow that type is library-container
2017-03-05 02:09:52 +01:00
Daniel Marjamäki
c832b2f40b
ValueType: Fixed bug
2017-03-05 01:39:56 +01:00
Daniel Marjamäki
920398615d
ValueType: handle scoped types in parsedecl
2017-03-05 01:21:02 +01:00
Daniel Marjamäki
2f2ac46243
Replaced hardcoding for char16_t and char32_t with configuration
2017-03-04 16:30:42 +01:00
Daniel Marjamäki
12fe4a8b3e
Fixed #7885 (ValueType: Wrong type for large hexvalue (platform=win32A))
2017-03-04 14:19:14 +01:00
Daniel Marjamäki
ecc59859e1
Don't simplify _Bool in TokenList
2017-03-04 11:13:28 +01:00
Daniel Marjamäki
45c5860ca4
Fixed #7926 (Memory Leak with auto not detected)
2017-03-02 22:24:26 +01:00
Daniel Marjamäki
995d875cb2
SymbolDatabase: Refactoring
2017-03-01 18:09:50 +01:00
Daniel Marjamäki
51b5f1c286
Fixed #7931 (crash: SymbolDatabase: Variable::setFlag)
2017-03-01 17:13:22 +01:00
PKEuS
7eee6af4ce
Fixed broken condition
2017-03-01 11:42:14 +01:00
PKEuS
2f0db369f0
Refactorization: Avoid construction of empty strings by using emptyString
2017-03-01 10:50:50 +01:00
PKEuS
d501e488ca
Refactorization: Reordered conditions in Scope::findFunction()
2017-03-01 10:27:01 +01:00
PKEuS
85768f1829
SymbolDatabase: Overload matching with boolean literals as argument and with arbitrary null-pointers
2017-02-28 22:43:47 +01:00
PKEuS
942644fde6
SymbolDatabase: Overload matching with character literals as argument
2017-02-28 22:08:41 +01:00
Daniel Marjamäki
beaf29c158
SymbolDatabase: Update some properties for auto variables
2017-02-27 23:04:25 +01:00
Daniel Marjamäki
994f6b684d
ValueType: initial handling of new
2017-02-27 20:57:28 +01:00
PKEuS
900d05d9dd
Optimization: Do not attempt to find a matching function for if, for, while, etc.
2017-02-27 10:35:47 +01:00
Daniel Marjamäki
7ecd5db8fb
ValueType: Handle auto in range for loop
2017-02-27 02:09:33 +01:00
Daniel Marjamäki
2da360eec5
ValueType: Handle 'auto *p = ..'
2017-02-26 22:43:10 +01:00
Daniel Marjamäki
dad455c0dd
ValueType: Handle 'auto'. First fix for #4345
2017-02-26 20:02:57 +01:00
PKEuS
c1d8fd7f13
SymbolDatabase: Better handling of pointers in findFunction(), supporting const pointers and std::string overloads
2017-02-26 11:36:04 +01:00
PKEuS
4a27376694
SymbolDatabase: Implement two-stage fallback mechanism for matching function overloads, increasing matching accuracy
2017-02-25 23:12:00 +01:00
PKEuS
3f1e2b4270
More conservative fallback for function overload matching
2017-02-24 20:56:47 +01:00
PKEuS
4e28d40bf0
Fixed matching long long overload to function call f(0)
2017-02-24 20:33:52 +01:00
Robert Reif
8e0f1ec788
Fixed #7909 (Crash in CheckMemoryLeakInClass)
2017-02-20 23:09:35 +01:00
Matthias Krüger
6f1e7e897d
simplify if(tok && Token::{simple,}Match) to if(Token::{simple,}Match).
2017-02-06 15:37:12 +01:00
Daniel Marjamäki
7bdd001a5f
SymbolDatabase: Removed redundant 'else'
2017-01-09 22:48:05 +01:00
Simon Martin
bd92ddd386
Ticket #7850 : Properly handle C functions called "class".
2017-01-06 21:16:28 +01:00
Robert Reif
4123b457d7
Fixed #7441 (SymbolDatabase: No scope when function return type not specified)
2017-01-06 11:53:17 +01:00
Daniel Marjamäki
a184d5d421
SymbolDatabase: Refactoring
2017-01-01 11:34:05 +01:00
Daniel Marjamäki
4558701c08
varid: don't generate varid and symboldatabase variable for function call parameter
2016-12-18 20:16:38 +01:00
Daniel Marjamäki
17aaecbd6b
ValueFlow: Improved handling of sizeof
2016-12-18 14:03:48 +01:00
PKEuS
cfac3b457d
Several small refactorizations
2016-12-06 22:12:02 +01:00
PKEuS
6e8ac13325
Refactorization:
...
- Optimized std::string usage
- Replaced list by vector
- Moved iterator into loop head
- Ran AStyle
2016-12-05 17:45:34 +01:00
Daniel Marjamäki
c12cb69cc2
ValueType: Handle function pointers
2016-12-04 16:02:50 +01:00
PKEuS
36d12d7866
SymbolDatabase: Function::retDef should not point at "static" or "extern"
2016-11-28 17:23:39 +01:00
Matthias Krüger
b3ace258ab
there is no need to have "if(tok && Token::Match(tok,..." since Token::Match checks "tok" by itselfs already.
2016-11-26 17:22:30 +01:00
Frank Zingsheim
c8ff96fe8f
Fixed #6180 (Usage of variable after std::move or std::forward)
2016-11-20 15:14:49 +01:00
Daniel Marjamäki
1235815ae9
SymbolDatabase: refactoring condition
2016-11-18 22:01:15 +01:00
Daniel Marjamäki
2f27a0c8f6
Revert "SymbolDatabase: refactoring condition"
...
I don't see why, but this did not work well on appveyor.
This reverts commit 5d7a4d51ad
.
2016-11-17 22:53:03 +01:00
Daniel Marjamäki
79fc332511
Fixed #7810 (SymbolDatabase: method with redundant scope info)
2016-11-17 22:45:50 +01:00