Daniel Marjamäki
ad4ce84cf7
Rename private member variables
2018-06-17 17:20:16 +02:00
Daniel Marjamäki
ac28ae5788
Renamed Token::_str
2018-06-16 23:03:15 +02:00
Daniel Marjamäki
237314fb51
Rename _values to mValues
2018-06-16 21:45:53 +02:00
Daniel Marjamäki
0452c5a4e4
Renamed _bits to mBits
2018-06-16 21:43:44 +02:00
Daniel Marjamäki
d468eca772
Renamed _valuetype to mValueType
2018-06-16 21:42:40 +02:00
Daniel Marjamäki
82169b6247
Renamed _originalName to mOriginalName
2018-06-16 21:40:25 +02:00
Daniel Marjamäki
759097301b
Rename _link to mLink
2018-06-16 20:30:09 +02:00
Daniel Marjamäki
e8a00a38ac
Rename _scope to mScope
2018-06-16 20:29:17 +02:00
Daniel Marjamäki
7314fc7557
Rename _enumerator to mEnumerator
2018-06-16 20:27:49 +02:00
Daniel Marjamäki
3ca8372b37
Rename _variable to mVariable
2018-06-16 20:27:13 +02:00
Daniel Marjamäki
964841ba25
Rename _function to mFunction
2018-06-16 20:26:43 +02:00
Daniel Marjamäki
78974e9267
Rename _type to mType
2018-06-16 20:25:54 +02:00
Daniel Marjamäki
31f137f24d
Renamed _fileIndex, _linenr, _col
2018-06-16 16:43:54 +02:00
Daniel Marjamäki
a6e4663445
Renamed _progressValue to mProgressValue
2018-06-16 16:41:25 +02:00
Daniel Marjamäki
aeea2e7427
Renamed _tokType to mTokType
2018-06-16 16:40:02 +02:00
Daniel Marjamäki
8e2b18a75a
Rename _varId to mVarId
2018-06-16 16:38:50 +02:00
Daniel Marjamäki
cc521bef99
renamed _tokensFrontBack to mTokensFrontBack
2018-06-16 16:22:35 +02:00
Daniel Marjamäki
26d58ddbb9
rename _astOperand1, _astOperand2, _astParent
2018-06-16 16:18:50 +02:00
Daniel Marjamäki
435aa70c3d
rename _previous and _next
2018-06-16 16:16:55 +02:00
Daniel Marjamäki
363f4ca939
rename _flags to mFlags
2018-06-16 16:14:34 +02:00
amai2012
db7d267c02
Refactoring: Add _ prefix to Token member variables ( #1280 )
2018-06-09 08:14:24 +02:00
IOBYTE
3982c81394
Add support for C++ attribute nodiscard for functions. ( #1269 )
2018-05-29 21:43:56 +02:00
Daniel Marjamäki
7d4a80fbd2
astyle formatting
...
[ci skip]
2018-05-29 16:30:33 +02:00
orbitcowboy
bf20aa2330
token.h: Added const-qualifiers to some functions.
2018-05-29 11:46:07 +02:00
rebnridgway
42a65c5160
Fix crash bug #8579 ( #1238 )
...
* Added declaration for deletePrevious function
* Added definition for deletePrevious function
* Fixed crash from deleteThis invalidating pointers
The crash was caused by deleteThis() invalidating the pointer to a constant variable usage. This happened when a usage followed an assignment. This fixes bug #8579 .
* Added tokensFront to match tokensBack
This means deletePrevious can set the list's front if necessary.
* Initialised tokensFront in appropriate places
* Switched to using default Token constructor
* Switched to using Token default constructor
* Switched to using default constructor for Token
* Added missing argument to Token constructor
* Changed to use default constructor for Tokens
* Switched to using default constructor for Tokens
* Switched to using default constructor for Token
* Added new test for deleting front Token
Also made sure to use the correct constructor for Token in other tests.
* Syntax error
* Replaced tokensFront and tokensBack with a struct
This decreases the size of the Token class for performance purposes.
* Replaced tokensFront and tokensBack with a struct
* Added tokensFrontBack to destructor
* Reworked to use TokensBackFront struct
Also ran astyle.
* Reworked to use TokenList's TokensFrontBack member
* Reworked to use TokensFrontBack struct
* Reworked to use TokensFrontBack struct
* Reworked to work with TokensFrontBack struct
* Removed unnecessary scope operator
* Added missing parentheses
* Fixed syntax error
* Removed unnecessary constructor
* Default constructor now 0-initialises everything
This is safer for not using a temporary TokensFrontBack object, and doesn't use delegating constructors which aren't supported yet.
* Fixed unsafe null check
* Added missing explicit keyword
* Fixing stylistic nits
Removed default constructor as it has been superseded by the single-argument constructor with a default argument value.
Renamed listEnds to tokensFrontBack.
Fixed if statement that was supposed to be adding safety but would actually cause a crash if tokensFrontBack was null.
* Fixing stylistic nits
Removed default constructor and replaced it with a single-argument constructor with a default value.
* Fixing stylistic nits
Renamed _listEnds to _tokensFrontBack.
* Fixing stylistic nits
Renamed _listEnds to _tokensFrontBack.
2018-05-25 07:15:05 +02:00
Daniel Marjamäki
59cc479855
Save bitfield bit counts
2018-05-02 20:55:11 +02:00
Paul
43be20a824
Check more opposite conditions
2018-03-24 07:58:37 +01:00
Daniel Marjamäki
c0e14d0a5d
Added doxygen comment
2018-03-12 12:49:27 +01:00
Daniel Marjamäki
c4caee6b18
Updated copyright year
2018-01-14 15:37:52 +01:00
Daniel Marjamäki
bbeff99cc3
Fixed #6930 (Token: need function that says if the token comes from instantiated template argument)
2018-01-11 09:41:22 +01:00
Daniel Marjamäki
b57dd4359b
Fixed #8263 (check-library incorrectly reports missing configuration for case when value is in parentheses)
2017-11-17 22:10:39 +01:00
orbitcowboy
f1e5f64690
wxwidgets.cfg: Added support for wxMenu:Append().
2017-10-17 10:59:23 +02:00
Florin Iucha
cccf035535
Memoize token nature computation
2017-10-17 09:00:14 +02:00
Daniel Marjamäki
ea0db18e0c
Refactor Token::deleteThis()
2017-08-25 23:30:04 +02:00
Daniel Marjamäki
ca6109b40c
threadsafety: Fix static data in Token::values()
2017-08-13 14:15:24 +02:00
Ayaz Salikhov
b8cd7dbb5c
Use nullptr instead of 0 or NULL ( #936 )
2017-08-09 20:00:26 +02:00
Ayaz Salikhov
3cd2f2d092
Don't cast bool to bool
2017-06-01 01:49:40 +03:00
Ayaz Salikhov
28aa939d69
iwyu - include what you use
2017-05-27 04:33:47 +02:00
Daniel Marjamäki
6230919976
Skip 'Stringification => Tokenize' step
2017-05-17 14:57:54 +02:00
Alexander Mai
c1cdcc158f
Run astyle. Fix some Doxygen issues
2017-05-06 11:57:02 +02:00
Daniel Marjamäki
f8e9071de1
CheckFunction: In the <valid> check handle possible/conditional/inconclusive values better
2017-04-20 22:14:54 +02:00
Matthias Krüger
79010eecea
lib: fix a bunch of warnings about differing function arguments in definition and declaration.
...
[lib/token.h:72] -> [lib/token.cpp:36]: (style, inconclusive) Function 'Token' argument 1 names different: declaration 'tokensBack' definition 't'.
[lib/token.h:445] -> [lib/token.cpp:497]: (style, inconclusive) Function 'multiCompare' argument 1 names different: declaration 'needle' definition 'tok'.
[lib/checkio.h:73] -> [lib/checkio.cpp:1385]: (style, inconclusive) Function 'ArgumentInfo' argument 3 names different: declaration 'isCPP' definition '_isCPP'.
[lib/checkother.h:216] -> [lib/checkother.cpp:2136]: (style, inconclusive) Function 'checkComparisonFunctionIsAlwaysTrueOrFalseError' argument 2 names different: declaration 'strFunctionName' definition 'functionName'.
[lib/errorlogger.h:214] -> [lib/errorlogger.cpp:51]: (style, inconclusive) Function 'ErrorMessage' argument 2 names different: declaration 'file0' definition 'file0_'.
[lib/errorlogger.h:215] -> [lib/errorlogger.cpp:65]: (style, inconclusive) Function 'ErrorMessage' argument 2 names different: declaration 'file0' definition 'file0_'.
[lib/library.h:327] -> [lib/library.cpp:1043]: (style, inconclusive) Function 'ignorefunction' argument 1 names different: declaration 'function' definition 'functionName'.
[lib/mathlib.h:112] -> [lib/mathlib.cpp:1275]: (style, inconclusive) Function 'isNullValue' argument 1 names different: declaration 'tok' definition 'str'.
[lib/preprocessor.h:91] -> [lib/preprocessor.cpp:122]: (style, inconclusive) Function 'setDirectives' argument 1 names different: declaration 'tokens' definition 'tokens1'.
[lib/symboldatabase.h:860] -> [lib/symboldatabase.cpp:1801]: (style, inconclusive) Function 'argsMatch' argument 1 names different: declaration 'info' definition 'scope'.
[lib/symboldatabase.h:1171] -> [lib/symboldatabase.cpp:2048]: (style, inconclusive) Function 'addClassFunction' argument 1 names different: declaration 'info' definition 'scope'.
[lib/symboldatabase.h:1174] -> [lib/symboldatabase.cpp:2208]: (style, inconclusive) Function 'addNewFunction' argument 1 names different: declaration 'info' definition 'scope'.
[lib/symboldatabase.h:1090] -> [lib/symboldatabase.cpp:3648]: (style, inconclusive) Function 'findVariableType' argument 2 names different: declaration 'type' definition 'typeTok'.
[lib/symboldatabase.h:1101] -> [lib/symboldatabase.cpp:4308]: (style, inconclusive) Function 'findType' argument 1 names different: declaration 'tok' definition 'startTok'.
[lib/symboldatabase.h:1176] -> [lib/symboldatabase.cpp:4349]: (style, inconclusive) Function 'findTypeInNested' argument 1 names different: declaration 'tok' definition 'startTok'.
[lib/symboldatabase.h:1193] -> [lib/symboldatabase.cpp:4501]: (style, inconclusive) Function 'setValueType' argument 2 names different: declaration 'enumerators' definition 'enumerator'.
[lib/path.h:159] -> [lib/path.cpp:247]: (style, inconclusive) Function 'isCPP' argument 1 names different: declaration 'extensionInLowerCase' definition 'path'.
[lib/path.h:145] -> [lib/path.cpp:266]: (style, inconclusive) Function 'acceptFile' argument 1 names different: declaration 'filename' definition 'path'.
2017-04-03 00:06:46 +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
Frank Zingsheim
cb5a5e6a25
Improve Fix #6180 (Access of moved variable still allowed until function is called)
2016-12-17 16:42:46 +01:00
Daniel Marjamäki
b6cba4a55c
Fixed #7784 (Token: can't be both type and variable)
2016-11-26 22:39:47 +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
4732667488
ValueFlow: allow more value types
2016-11-13 22:33:39 +01:00
orbitcowboy
960a0c6b11
Token: Improved const correctness of findsimplematch() and findmatch(). There are no functional changes.
2016-10-29 21:37:45 +02:00
Daniel Marjamäki
efa3aba32a
Remove Tokenizer::simplifyNull()
2016-10-18 21:44:02 +02:00
Daniel Marjamäki
ac1a869d60
unused struct members: don't warn about packed structs ( #3088 )
2016-09-05 17:27:12 +02:00