cppcheck/test
Paul Fultz II f603b529df Fix issue 8413: Condition is always false 'i=expr; if (i != expr) {}' (#1295)
* Follow variables when comparing same expression

* Remove assert include

* Dont follow function arguments

* Improve the checking to check more cases

* Add more tests

* Check if the variable is used inside a loop

* Follow both variables

* Only skip loops when variable is modified in scope

* Fix FP when followed variable is modified

* Dont follow arrays

* Skip pointer indirection

* Make recursive

* Improve checking more variables

* Fix test with sizeof

* Skip following operators

* Fix test when using sizeof

* Dont check every step

* Use early returns

* Update test to use a loop instead of conditional

* Add static

* Check variables are global

* Check local variables in another scope

* Fix issue with const pointers

* Distinguish between pointer indirection and multiply

* Use simple match

* Prevent crash with uniform initialization

* Use unary op and ast to detect pointer indirection

* Expand error message when expression do not match exactly

* Add errorpath to issameexpression

* Revert "Clarify warning message for 'Same expression on both sides of operator'"

This reverts commit 0e491b41a8.

* Check if the tokens are the same

* Report the operator and not the expressions
2018-08-07 09:32:16 +02:00
..
cfg posix.cfg: Add some pthread_mutex_* functions. (#1320) 2018-07-21 17:52:12 +02:00
synthetic Improve Python code 2017-06-05 13:23:00 +02:00
CMakeLists.txt Fixed #7660 (cmake build does not handle simplecpp) 2016-08-06 18:21:54 +02:00
options.cpp Updated copyright year 2018-01-14 15:37:52 +01:00
options.h Updated copyright year 2018-01-14 15:37:52 +01:00
redirect.h Updated copyright year 2018-01-14 15:37:52 +01:00
test.cxx
test64bit.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testassert.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testastutils.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testautovariables.cpp Use Variable::valueType instead of Variable::typeStartToken in auto variables 2018-06-24 08:25:19 +02:00
testbool.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testboost.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testbufferoverrun.cpp Fix crash bug #8579 (#1238) 2018-05-25 07:15:05 +02:00
testcharvar.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testclass.cpp Fixed #8636 (Misleading verbose message if virtual method called from destructor) 2018-07-26 09:16:17 +02:00
testcmdlineparser.cpp Fix testrunner 2018-08-05 14:01:24 +02:00
testcondition.cpp Fix issue 8413: Condition is always false 'i=expr; if (i != expr) {}' (#1295) 2018-08-07 09:32:16 +02:00
testconstructors.cpp CheckClass: Restore a few warnings about member initialization of classes 2018-06-29 22:54:12 +02:00
testcppcheck.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testerrorlogger.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testexceptionsafety.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testfilelister.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testfiles.pri testrunner: Add testplatform to verify platform loading (#1176) 2018-04-18 16:12:35 +02:00
testfunctions.cpp Add checks of log2 and log1p range (#1324) 2018-08-03 12:14:39 +02:00
testgarbage.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testimportproject.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testincompletestatement.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testinternal.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testio.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testleakautovar.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testlibrary.cpp Rename Library::isargvalid() 2018-07-15 23:05:48 +02:00
testmathlib.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testmemleak.cpp Fix testrunner 2018-08-05 14:01:24 +02:00
testnullpointer.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testoptions.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testother.cpp Fix issue 8413: Condition is always false 'i=expr; if (i != expr) {}' (#1295) 2018-08-07 09:32:16 +02:00
testpath.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testpathmatch.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testplatform.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testpostfixoperator.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testpreprocessor.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testrunner.cpp Updated copyright year 2018-01-14 15:37:52 +01:00
testrunner.vcxproj Visual Studio: testrunner: Add missing testastutils (#1186) 2018-04-23 20:03:06 +02:00
testrunner.vcxproj.filters Visual Studio: testrunner: Add missing testastutils (#1186) 2018-04-23 20:03:06 +02:00
testsamples.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testsimplifytemplate.cpp astyle formatting 2018-05-31 07:02:08 +02:00
testsimplifytokens.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testsimplifytypedef.cpp Fixed #7406 (Tokenizer::simplifyTypedef: array typedef used as template parameter) (#1257) 2018-05-22 17:31:58 +02:00
testsizeof.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
teststl.cpp Fix issue 4693: Diagnostic when using the same iterators to an algorithm (#1326) 2018-08-05 09:10:54 +02:00
teststring.cpp Clarify warnings when char literals are converted to bool in conditions 2018-07-21 18:40:06 +02:00
testsuite.cpp TestSuite: Allow that verbose messages are reported in a test 2018-07-26 09:15:33 +02:00
testsuite.h TestSuite: Allow that verbose messages are reported in a test 2018-07-26 09:15:33 +02:00
testsuppressions.cpp inline suppressions: treat arithmetic operators as start-of-comment 2018-06-09 22:50:51 +02:00
testsymboldatabase.cpp Extend TestSymbolDatabase::findFunction19 to outline different results depending whether char is signed or unsigned on compile time 2018-06-28 22:16:18 +02:00
testthreadexecutor.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testtimer.cpp Fix testrunner compiling 2018-06-16 22:28:14 +02:00
testtoken.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testtokenize.cpp windows.cfg: Improved support for more types. 2018-05-16 16:26:40 +02:00
testtokenlist.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testtype.cpp Fixed #8575 (false positive: longCastAssign) 2018-06-04 22:51:21 +02:00
testuninitvar.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testunusedfunctions.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testunusedprivfunc.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testunusedvar.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testutils.h Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testvaarg.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testvalueflow.cpp astyle formatting 2018-07-25 23:02:16 +02:00
testvarid.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00