cppcheck/lib
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
..
CMakeLists.txt Fixed #7660 (cmake build does not handle simplecpp) 2016-08-06 18:21:54 +02:00
analyzerinfo.cpp Refactorization: pass std::string directly to std::*fstream 2018-04-11 09:50:42 +02:00
analyzerinfo.h Updated copyright year 2018-01-14 15:37:52 +01:00
astutils.cpp Small optimization in checkmemoryleak.cpp: Allow passing literals to addtoken() 2018-05-14 10:15:50 +02:00
astutils.h Fix FP with duplicate assignments by checking if the expression is unique (#1223) 2018-05-13 20:20:55 +02:00
check.cpp Updated copyright year 2018-01-14 15:37:52 +01:00
check.h CLI: Added more fields for --template and added a new --template-location. The gcc predefined template now matches latest gcc better. 2018-04-23 12:21:18 +02:00
check64bit.cpp Refactoring; Renamed Scope::classStart and Scope::classEnd 2018-04-27 22:36:30 +02:00
check64bit.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkassert.cpp Refactoring; Renamed Scope::classStart and Scope::classEnd 2018-04-27 22:36:30 +02:00
checkassert.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkautovariables.cpp Refactoring; Renamed Scope::classStart and Scope::classEnd 2018-04-27 22:36:30 +02:00
checkautovariables.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkbool.cpp Refactoring; Renamed Scope::classStart and Scope::classEnd 2018-04-27 22:36:30 +02:00
checkbool.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkboost.cpp Refactoring; Renamed Scope::classStart and Scope::classEnd 2018-04-27 22:36:30 +02:00
checkboost.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkbufferoverrun.cpp SymbolDatabase: Refactor SymbolDatabase: variable list 2018-04-28 09:38:33 +02:00
checkbufferoverrun.h fix -Winconsistent-missing-override warnings reported by clang 6.0. 2018-05-17 08:47:19 +02:00
checkclass.cpp Revert "Missing override specifier warning on a pure virtual function makes no sense. (#1230)" 2018-05-15 10:48:34 +02:00
checkclass.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkcondition.cpp Fix false positive with inner conditions when using pointers (#1195) 2018-04-28 18:56:13 +02:00
checkcondition.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkexceptionsafety.cpp Refactoring; Renamed Scope::classStart and Scope::classEnd 2018-04-27 22:36:30 +02:00
checkexceptionsafety.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkfunctions.cpp Refactoring; Renamed Scope::classStart and Scope::classEnd 2018-04-27 22:36:30 +02:00
checkfunctions.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkinternal.cpp Refactoring; Renamed Scope::classStart and Scope::classEnd 2018-04-27 22:36:30 +02:00
checkinternal.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkio.cpp Fix crash bug #8579 (#1238) 2018-05-25 07:15:05 +02:00
checkio.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkleakautovar.cpp Fixed #8262: false positive memleak (`shared_ptr` in function argument) (#1249) 2018-05-22 09:08:23 +02:00
checkleakautovar.h Fixed #8262: false positive memleak (`shared_ptr` in function argument) (#1249) 2018-05-22 09:08:23 +02:00
checkmemoryleak.cpp Fix crash bug #8579 (#1238) 2018-05-25 07:15:05 +02:00
checkmemoryleak.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checknullpointer.cpp astyle formatting 2018-05-10 17:57:16 +02:00
checknullpointer.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkother.cpp Fix FP with duplicate assignments by checking if the expression is unique (#1223) 2018-05-13 20:20:55 +02:00
checkother.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkpostfixoperator.cpp Refactoring; Renamed Scope::classStart and Scope::classEnd 2018-04-27 22:36:30 +02:00
checkpostfixoperator.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checksizeof.cpp Refactoring; Renamed Scope::classStart and Scope::classEnd 2018-04-27 22:36:30 +02:00
checksizeof.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkstl.cpp SymbolDatabase: Refactor SymbolDatabase: variable list 2018-04-28 09:38:33 +02:00
checkstl.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkstring.cpp Refactoring; Renamed Scope::classStart and Scope::classEnd 2018-04-27 22:36:30 +02:00
checkstring.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checktype.cpp Refactoring; Renamed Scope::classStart and Scope::classEnd 2018-04-27 22:36:30 +02:00
checktype.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkuninitvar.cpp Optimization in CheckUninitVar::checkStruct(): Replaced expensive inner loop on all scopes by loop on child scopes for faster lookup for inner unions. 2018-05-14 15:48:57 +02:00
checkuninitvar.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkunusedfunctions.cpp fix a few typos 2018-05-14 13:11:59 +02:00
checkunusedfunctions.h fix -Winconsistent-missing-override warnings reported by clang 6.0. 2018-05-17 08:47:19 +02:00
checkunusedvar.cpp SymbolDatabase: Refactor SymbolDatabase: variable list 2018-04-28 09:38:33 +02:00
checkunusedvar.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
checkvaarg.cpp SymbolDatabase: Refactor SymbolDatabase: variable list 2018-04-28 09:38:33 +02:00
checkvaarg.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
config.h Removed non-standard code annotations with __attribute__ 2016-01-09 09:33:56 +01:00
cppcheck.cpp modernize cppcheck.cpp, use range for loops 2018-05-22 23:22:46 +02:00
cppcheck.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
cppcheck.natvis Added cppcheck.natvis file for human readable debug information in Visual Studio. 2017-01-22 10:21:29 +01:00
cppcheck.vcxproj Copy platforms/ directory to bin/ 2018-02-27 09:09:12 +01:00
cppcheck.vcxproj.filters Fixed travis build by replacing Token::Match by simpleMatch() 2017-03-16 21:15:10 +01:00
errorlogger.cpp errorlogger: fix handling of {inconclusive} 2018-04-24 11:10:41 +02:00
errorlogger.h CLI: Added more fields for --template and added a new --template-location. The gcc predefined template now matches latest gcc better. 2018-04-23 12:21:18 +02:00
importproject.cpp Import BCB6 projects (#1245) 2018-05-20 18:19:20 +02:00
importproject.h Import BCB6 projects (#1245) 2018-05-20 18:19:20 +02:00
lib.pri Added --cppcheck-build-dir flag 2016-10-29 12:18:11 +02:00
library.cpp Check for double frees when using smart pointers (#1172) 2018-04-16 11:11:13 +02:00
library.h library.h: Improved const correctness of some function arguments. 2018-05-24 17:06:20 +02:00
matchcompiler.h Update copyright year to 2007-2016. 2016-01-01 15:34:45 +02:00
mathlib.cpp Improve constness 2018-04-04 21:51:31 +02:00
mathlib.h Updated copyright year 2018-01-14 15:37:52 +01:00
path.cpp Refactor Path::getRelativePath() 2018-04-18 22:23:38 +02:00
path.h Updated copyright year 2018-01-14 15:37:52 +01:00
pathmatch.cpp Updated copyright year 2018-01-14 15:37:52 +01:00
pathmatch.h Updated copyright year 2018-01-14 15:37:52 +01:00
pcrerules.pri
platform.cpp Updated copyright year 2018-03-31 20:59:09 +02:00
platform.h Updated copyright year 2018-03-31 20:59:09 +02:00
preprocessor.cpp Updated 'noValidConfiguration' message. It should not write this message when there is no code. It should be possible to see the preprocessor errors otherwise it is hard to fix the configuration. 2018-05-15 15:42:54 +02:00
preprocessor.h Updated copyright year 2018-01-14 15:37:52 +01:00
settings.cpp Updated copyright year 2018-01-14 15:37:52 +01:00
settings.h CLI: Added more fields for --template and added a new --template-location. The gcc predefined template now matches latest gcc better. 2018-04-23 12:21:18 +02:00
standards.h Updated copyright year 2018-01-14 15:37:52 +01:00
suppressions.cpp Fixed #8515 (Wrong info message about unmatched suppression) 2018-05-11 09:01:24 +02:00
suppressions.h Fix compiler warning by useless semicolon 2018-05-16 21:33:26 +02:00
symboldatabase.cpp Fixed #8258 (Incorrect diagnostics when using delegating consturctor with default values) (#1255) 2018-05-22 06:42:37 +02:00
symboldatabase.h Refactorization in SymbolDatabase: Do not redundantly store name in FriendInfo, and store FriendInfo in vector instead of list 2018-05-14 12:18:59 +02:00
templatesimplifier.cpp Fix template instantialion failure for qualified template type. (#1237) 2018-05-16 15:24:23 +02:00
templatesimplifier.h Revert "Optimize usage of TemplateSimplifier::simplifyCalculations" 2018-05-11 21:26:28 +02:00
timer.cpp Improve constness 2018-04-04 21:51:31 +02:00
timer.h timer.h: Improved const correctness of local variable. 2018-05-24 17:07:40 +02:00
token.cpp Fix crash bug #8579 (#1238) 2018-05-25 07:15:05 +02:00
token.h Fix crash bug #8579 (#1238) 2018-05-25 07:15:05 +02:00
tokenize.cpp Fix crash bug #8579 (#1238) 2018-05-25 07:15:05 +02:00
tokenize.h Add support for namespace aliases and C++17 nested namespaces. (#1210) 2018-05-08 06:35:51 +02:00
tokenlist.cpp Fix crash bug #8579 (#1238) 2018-05-25 07:15:05 +02:00
tokenlist.h Fix crash bug #8579 (#1238) 2018-05-25 07:15:05 +02:00
utils.h Replaced make_container by C++11 initializer lists 2018-04-08 23:03:44 +02:00
valueflow.cpp Fix comment 2018-05-07 22:06:23 +02:00
valueflow.h Updated copyright year 2018-01-14 15:37:52 +01:00
version.h Set version to 1.83.99/1.84 dev 2018-04-02 15:21:37 +02:00
version.rc