cppcheck/test
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
..
cfg windows.cfg: Add support for `__alignof()` (#2271) 2019-10-15 16:02:28 +02:00
cli Import project: Ignoring paths better 2019-09-12 09:32:24 +02:00
synthetic
testsuites Typos found by running "codespell" (#1804) 2019-04-23 13:26:48 +02:00
verify ExprEngine: Handle << and >> 2019-10-08 21:38:10 +02:00
CMakeLists.txt Track lifetime across multiple returns 2019-09-11 19:25:09 +02:00
options.cpp Update Copyright 2019-06-29 07:49:14 +02:00
options.h Update Copyright 2019-06-29 07:49:14 +02:00
redirect.h
test.cxx
test64bit.cpp
testassert.cpp
testastutils.cpp Fix issue 9305: False positive uninitvar - struct initialized via function (#2123) 2019-08-30 18:32:45 +02:00
testautovariables.cpp astyle formatting 2019-10-14 19:41:51 +02:00
testbool.cpp Fix false negatives in checkBitwiseOnBoolean (#2220) 2019-10-06 09:57:31 +02:00
testboost.cpp
testbufferoverrun.cpp TestBufferOverrun: Enable passing tests (#2246) 2019-10-07 09:17:12 +02:00
testcharvar.cpp Remove test case, ValueFlow will truncate and sign-extend values 2019-05-01 19:33:47 +02:00
testclass.cpp Virtual Destructors: Base class must have virtual destructor no matter if derived class has a destructor or not. There is UB according to paragraph 3 in [expr.delete]. 2019-09-27 09:55:56 +02:00
testcmdlineparser.cpp Convert SHOWTIME_MODES to enum class 2019-07-31 22:35:51 +02:00
testcondition.cpp Fix issue 9367: FP knownConditionTrueFalse (#2209) 2019-09-24 08:15:03 +02:00
testconstructors.cpp Revert "#9391 Detecting uninited member variables with default ctor (#2249)" 2019-10-09 08:17:47 +02:00
testcppcheck.cpp added missing OVERRIDE usage and removed redundant virtual (#2190) 2019-09-20 21:57:16 +02:00
testerrorlogger.cpp Fixed #9260 (--template=gcc does not work correctly with -j) 2019-08-18 16:33:32 +02:00
testexceptionsafety.cpp
testexprengine.cpp ExprEngine: Improved handling of struct member assignments in loop 2019-10-14 19:41:32 +02:00
testfilelister.cpp
testfunctions.cpp Various clang-tidy fixes (#2192) 2019-09-25 15:25:19 +02:00
testgarbage.cpp testgarbage.cpp: Spelling in comment (#2172) 2019-09-12 20:52:39 +02:00
testimportproject.cpp testrunner: Fix assertion error 2019-08-17 15:12:49 +02:00
testincompletestatement.cpp astyle formatting 2019-05-21 10:43:33 +02:00
testinternal.cpp fix #8965 ("(debug) Executable scope 'x' with unknown function." with rvalue parameter in method) (#2237) 2019-10-04 12:30:11 +02:00
testio.cpp Track lifetime across multiple returns 2019-09-11 19:25:09 +02:00
testleakautovar.cpp Fix #7031 (improve error message for memory related warnings) (#2204) 2019-09-22 21:50:02 +02:00
testlibrary.cpp Refactoring: Convert enum Direction to enum class 2019-08-01 20:56:02 +02:00
testmathlib.cpp Keep prefix in string and char literals (#2272) 2019-10-16 11:41:33 +02:00
testmemleak.cpp Various clang-tidy fixes (#2192) 2019-09-25 15:25:19 +02:00
testnullpointer.cpp Formatted the code, there are no functional changes [ci skip]. 2019-10-01 08:39:08 +02:00
testoptions.cpp Allow multiple test case arguments to testrunner (#1755) 2019-03-26 20:28:40 +01:00
testother.cpp Parse `extern "C"`, and use it to avoid FP reference warnings (#2234) 2019-10-08 17:48:09 +02:00
testpath.cpp
testpathmatch.cpp
testplatform.cpp
testpostfixoperator.cpp Fixed #9042 (Another `using BOOL` type breach) (#1765) 2019-03-27 21:42:50 +01:00
testpreprocessor.cpp use range loops / constness (#2181) 2019-09-19 20:29:33 +02:00
testrunner.cpp Update Copyright 2019-06-29 07:49:14 +02:00
testrunner.vcxproj Windows testrunner: Add testexprengine.cpp (#2184) 2019-09-19 19:40:00 +02:00
testrunner.vcxproj.filters Windows testrunner: Add testexprengine.cpp (#2184) 2019-09-19 19:40:00 +02:00
testsamples.cpp
testsimplifytemplate.cpp fix #8965 ("(debug) Executable scope 'x' with unknown function." with rvalue parameter in method) (#2237) 2019-10-04 12:30:11 +02:00
testsimplifytokens.cpp Keep prefix in string and char literals (#2272) 2019-10-16 11:41:33 +02:00
testsimplifytypedef.cpp astyle formatting 2019-10-14 19:41:51 +02:00
testsimplifyusing.cpp fix using type aliases in out of class destructors (#2250) 2019-10-08 19:30:41 +02:00
testsizeof.cpp
teststl.cpp Track lifetime across multiple returns 2019-09-11 19:25:09 +02:00
teststring.cpp Keep prefix in string and char literals (#2272) 2019-10-16 11:41:33 +02:00
testsuite.cpp use range loops / constness (#2181) 2019-09-19 20:29:33 +02:00
testsuite.h Warn about unknown macro causing template syntax error (#2222) 2019-09-26 16:01:01 +02:00
testsuppressions.cpp Various clang-tidy fixes (#2192) 2019-09-25 15:25:19 +02:00
testsymboldatabase.cpp SymbolDatabase: Better handling of function call using smart pointer 2019-10-15 19:33:25 +02:00
testthreadexecutor.cpp
testtimer.cpp
testtoken.cpp Keep prefix in string and char literals (#2272) 2019-10-16 11:41:33 +02:00
testtokenize.cpp Keep prefix in string and char literals (#2272) 2019-10-16 11:41:33 +02:00
testtokenlist.cpp
testtype.cpp Fix severity of c++14 shifts with too many bits (#2213) 2019-09-25 20:16:04 +02:00
testuninitvar.cpp Fixed #9349 (FP ctuuninitvar for pointer dereferenced inside sizeof) 2019-09-12 13:29:52 +02:00
testunusedfunctions.cpp TestSuite: The ASSERT and ASSERT_EQUALS will now stop executing the test case upon failure. This can be used to avoid extra guard logic in tests. 2019-09-16 06:34:45 +02:00
testunusedprivfunc.cpp Run more tests on full token list (#2020) 2019-07-22 10:26:55 +02:00
testunusedvar.cpp Fixed #9234 (FP unreadVariable - assignment via iterator) 2019-08-04 10:21:16 +02:00
testutils.h added missing OVERRIDE usage and removed redundant virtual (#2190) 2019-09-20 21:57:16 +02:00
testvaarg.cpp
testvalueflow.cpp astyle formatting 2019-10-05 15:42:47 +02:00
testvarid.cpp Fix #9383 ("debug: Function::addArguments found argument 'x' with varid 0." with variadic templates) (#2238) 2019-10-06 12:45:42 +02:00