cppcheck/lib
Rikard Falkeborn 297360920a Keep prefix in string and char literals (#2272)
Keeping the prefix in the token allows cppcheck to print the correct
string and char literals in debug and error messages.

To achieve this, move some of the helper functions from token.cpp to
utils.h so that checks that look at string and char literals can reuse
them. This is a large part of this commit.

Note that the only user visible change is that when string and char
literals are printed in error messages, the prefix is now included.

For example:

	int f() {
		return test.substr( 0 , 4 ) == U"Hello" ? 0 : 1 ;
	};

now prints U"Hello" instead of "Hello" in the error message.
2019-10-16 11:41:33 +02:00
..
CMakeLists.txt CMake: Find header in externals, e.g. externals/picojson.h 2019-04-22 18:52:02 +02:00
analyzerinfo.cpp Update Copyright 2019-06-29 07:49:14 +02:00
analyzerinfo.h Updated copyright year 2018-10-13 18:20:31 +02:00
astutils.cpp Fix issue 9409: FP returnTempReference (#2266) 2019-10-13 19:12:46 +02:00
astutils.h Extend lifetime checking to temporaries (#2242) 2019-10-08 09:28:39 +02:00
check.cpp Updated copyright year 2019-09-01 11:49:43 +02:00
check.h deleted methods should be public (#2193) 2019-09-20 21:58:09 +02:00
check64bit.cpp Rename _tokenizer, _settings, _errorLogger 2018-06-16 16:10:28 +02:00
check64bit.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checkassert.cpp Update copyright year 2019-02-09 07:24:06 +01:00
checkassert.h added missing OVERRIDE usage and removed redundant virtual (#2190) 2019-09-20 21:57:16 +02:00
checkautovariables.cpp Extend lifetime checking to temporaries (#2242) 2019-10-08 09:28:39 +02:00
checkautovariables.h Extend lifetime checking to temporaries (#2242) 2019-10-08 09:28:39 +02:00
checkbool.cpp Fix false negatives in checkBitwiseOnBoolean (#2220) 2019-10-06 09:57:31 +02:00
checkbool.h Fix false negatives in checkBitwiseOnBoolean (#2220) 2019-10-06 09:57:31 +02:00
checkboost.cpp Rename _tokenizer, _settings, _errorLogger 2018-06-16 16:10:28 +02:00
checkboost.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checkbufferoverrun.cpp Dont warn for arrays that are containers (#2240) 2019-10-05 16:14:30 +02:00
checkbufferoverrun.h Fix Cppcheck warnings 2019-06-15 13:01:45 +02:00
checkclass.cpp Revert "#9391 Detecting uninited member variables with default ctor (#2249)" 2019-10-09 08:17:47 +02:00
checkclass.h Renamed safeClassRefMember => unsafeClassRefMember 2019-08-13 20:58:31 +02:00
checkcondition.cpp Fix issue 9351: false negative: (style) Condition '...' is always true (#2201) 2019-09-23 08:49:04 +02:00
checkcondition.h Add impossible values to ValueFlow (#2186) 2019-09-20 15:06:37 +02:00
checkexceptionsafety.cpp Refactoring; Use range for loops 2018-07-14 09:49:03 +02:00
checkexceptionsafety.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checkfunctions.cpp Replace 'unsigned' with 'nonneg' in checkfunctions 2019-07-16 08:49:02 +02:00
checkfunctions.h Replace 'unsigned' with 'nonneg' in checkfunctions 2019-07-16 08:49:02 +02:00
checkinternal.cpp CheckInternal: Extend redundant null pointer check before Token::Match() (#1789) 2019-04-06 07:44:44 +02:00
checkinternal.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checkio.cpp Fix issue 2153: valueFlowAfterCondition: struct member (#2228) 2019-09-30 21:04:43 +02:00
checkio.h replace 'unsigned' with 'nonneg' in checkio 2019-07-16 08:37:26 +02:00
checkleakautovar.cpp Fix #7031 (improve error message for memory related warnings) (#2204) 2019-09-22 21:50:02 +02:00
checkleakautovar.h Fix #7031 (improve error message for memory related warnings) (#2204) 2019-09-22 21:50:02 +02:00
checkmemoryleak.cpp leakNoReturnVar: Don't break early (#2095) 2019-08-23 06:33:00 +02:00
checkmemoryleak.h Memleak: Refactor check to separate function (#2079) 2019-08-13 13:00:59 +02:00
checknullpointer.cpp Move necessary code into valuetype (#2265) 2019-10-12 11:40:02 +02:00
checknullpointer.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checkother.cpp Parse `extern "C"`, and use it to avoid FP reference warnings (#2234) 2019-10-08 17:48:09 +02:00
checkother.h Created redundantInitialization id 2019-08-25 09:45:39 +02:00
checkpostfixoperator.cpp Refactoring: Use ranged for loop 2018-07-13 16:50:12 +02:00
checkpostfixoperator.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checksizeof.cpp Update Copyright 2019-06-29 07:49:14 +02:00
checksizeof.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checkstl.cpp Add impossible values to ValueFlow (#2186) 2019-09-20 15:06:37 +02:00
checkstl.h added missing OVERRIDE usage and removed redundant virtual (#2190) 2019-09-20 21:57:16 +02:00
checkstring.cpp Keep prefix in string and char literals (#2272) 2019-10-16 11:41:33 +02:00
checkstring.h Checkstring fixes (#1783) 2019-04-06 06:54:38 +02:00
checktype.cpp Fix severity of c++14 shifts with too many bits (#2213) 2019-09-25 20:16:04 +02:00
checktype.h Clarify signConversion warning message 2019-08-05 12:41:08 +02:00
checkuninitvar.cpp Fix issue 2153: valueFlowAfterCondition: struct member (#2228) 2019-09-30 21:04:43 +02:00
checkuninitvar.h Fix issue 8785: ValueFlow: Track pointer alias 2019-09-03 17:16:15 +02:00
checkunusedfunctions.cpp Fixed #8580 (False positive: unused function (lambda)) 2019-04-27 17:17:51 +02:00
checkunusedfunctions.h Silence unused variable warning (#2223) 2019-09-27 08:19:45 +02:00
checkunusedvar.cpp Fixed #9234 (FP unreadVariable - assignment via iterator) 2019-08-04 10:21:16 +02:00
checkunusedvar.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checkvaarg.cpp Update copyright year 2019-02-09 07:24:06 +01:00
checkvaarg.h added missing OVERRIDE usage and removed redundant virtual (#2190) 2019-09-20 21:57:16 +02:00
config.h sync (#1835) 2019-05-17 09:31:41 +02:00
cppcheck.cpp do not access static methods through instance (#2189) 2019-09-20 21:54:30 +02:00
cppcheck.h added missing OVERRIDE usage and removed redundant virtual (#2190) 2019-09-20 21:57:16 +02:00
cppcheck.natvis Fixed Visual Studio Natvis file after recent refactoring (#1299) 2018-07-09 08:27:26 +02:00
cppcheck.vcxproj Add exprengine.cpp to VisualStudio solution 2019-09-18 21:56:31 +02:00
cppcheck.vcxproj.filters Add exprengine.cpp to VisualStudio solution 2019-09-18 21:56:31 +02:00
ctu.cpp Add impossible values to ValueFlow (#2186) 2019-09-20 15:06:37 +02:00
ctu.h CTU: Add 'column' 2019-09-12 10:46:33 +02:00
errorlogger.cpp use range loops / constness (#2181) 2019-09-19 20:29:33 +02:00
errorlogger.h Fixed #9260 (--template=gcc does not work correctly with -j) 2019-08-18 16:33:32 +02:00
exprengine.cpp ExprEngine: Improved handling of struct member assignments in loops 2019-10-14 22:04:12 +02:00
exprengine.h Fix #9399 (Build Failure on x86: error: unknown type name '__int128_t') (#2254) 2019-10-09 10:25:21 +02:00
importproject.cpp Various clang-tidy fixes (#2192) 2019-09-25 15:25:19 +02:00
importproject.h astyle formatting 2019-08-12 12:54:25 +02:00
lib.pri ExprEngine: Add new experimental path-sensitive data flow analysis. Initially used for 'verification' but could possibly later be used as a complement in the normal analysis. The code is work-in-progress and hacky! 2019-09-17 21:00:59 +02:00
library.cpp Library: added 'stdtype' attribute in <podtype> element so we can configure standard types better 2019-09-29 16:48:25 +02:00
library.h Library: added 'stdtype' attribute in <podtype> element so we can configure standard types better 2019-09-29 16:48:25 +02:00
matchcompiler.h
mathlib.cpp Keep prefix in string and char literals (#2272) 2019-10-16 11:41:33 +02:00
mathlib.h Update copyright year 2019-02-09 07:24:06 +01:00
path.cpp Various clang-tidy fixes (#2192) 2019-09-25 15:25:19 +02:00
path.h Update copyright year 2019-02-09 07:24:06 +01:00
pathmatch.cpp Updated copyright year 2018-10-13 18:20:31 +02:00
pathmatch.h Updated copyright year 2018-10-13 18:20:31 +02:00
pcrerules.pri
platform.cpp use range loops / constness (#2181) 2019-09-19 20:29:33 +02:00
platform.h Updated copyright year 2019-09-01 11:49:43 +02:00
preprocessor.cpp Various clang-tidy fixes (#2192) 2019-09-25 15:25:19 +02:00
preprocessor.h Renamed private member file0 2018-06-17 09:06:16 +02:00
settings.cpp ExprEngine: Add --debug-verify, fixed handling of global arrays 2019-09-29 15:00:54 +02:00
settings.h ExprEngine: Add --debug-verify, fixed handling of global arrays 2019-09-29 15:00:54 +02:00
standards.h Various clang-tidy fixes (#2192) 2019-09-25 15:25:19 +02:00
suppressions.cpp Fix Cppcheck warning: Suppressions::dump can be const 2019-06-29 07:53:32 +02:00
suppressions.h Fix Cppcheck warning: Suppressions::dump can be const 2019-06-29 07:53:32 +02:00
symboldatabase.cpp SymbolDatabase: Better handling of function call using smart pointer 2019-10-15 19:33:25 +02:00
symboldatabase.h Extend lifetime checking to temporaries (#2242) 2019-10-08 09:28:39 +02:00
templatesimplifier.cpp avoid some unnecessary copies in emplace_back() calls (#2194) 2019-09-28 20:22:46 +02:00
templatesimplifier.h template simplifier: ignore friend templates (#2122) 2019-09-01 09:56:33 +02:00
timer.cpp Updated copyright year 2019-09-01 11:49:43 +02:00
timer.h Convert SHOWTIME_MODES to enum class 2019-07-31 22:35:51 +02:00
token.cpp Keep prefix in string and char literals (#2272) 2019-10-16 11:41:33 +02:00
token.h Parse `extern "C"`, and use it to avoid FP reference warnings (#2234) 2019-10-08 17:48:09 +02:00
tokenize.cpp Keep prefix in string and char literals (#2272) 2019-10-16 11:41:33 +02:00
tokenize.h fix using type aliases in out of class destructors (#2250) 2019-10-08 19:30:41 +02:00
tokenlist.cpp Fixed #9382 (Hang: CheckLeakAutoVar pellepl/spiffs/src/spiffs_hydrogen.c) 2019-10-06 09:52:05 +02:00
tokenlist.h template simplifier: fix new daca crashes (#2093) 2019-08-17 07:38:07 +02:00
utils.h Keep prefix in string and char literals (#2272) 2019-10-16 11:41:33 +02:00
valueflow.cpp Move necessary code into valuetype (#2265) 2019-10-12 11:40:02 +02:00
valueflow.h astyle formatting 2019-09-20 15:07:27 +02:00
version.h Set version to 1.89.99/1.90 dev 2019-09-02 15:44:40 +02:00
version.rc