Commit Graph

8447 Commits

Author SHA1 Message Date
Paul Fultz II 1fe1ec09a8 Reenable follow var for logical conjunction (#1400) 2018-10-01 14:40:03 +02:00
Paul Fultz II 2c91b95d2a Reenable followVar for multicondition (#1401) 2018-10-01 14:34:55 +02:00
Paul Fultz II 4598995564 Enable followVar for duplicate ternary expressions (#1406) 2018-10-01 14:31:06 +02:00
rikardfalkeborn b3fef7957a Fix FP with fclose after comma (#7525) (#1407) 2018-10-01 11:58:27 +02:00
Paul Fultz II 4ed22f1ff8 Fix some FPs in mismatchingContainerExpression (#1402) 2018-09-30 14:49:58 +02:00
amai 5c0fd0d5b4 Skip some test on cygwin since interface is not available 2018-09-29 16:49:12 +02:00
Paul Fultz II f65cf220ba Fix false positives in unknownEvaluationOrder when using followVar (#1391)
Fix false positives in unknownEvaluationOrder when using followVar
2018-09-28 08:38:24 +02:00
Daniel Marjamäki 9dccc4037b Fixed #8747 (Syntax error, AST broken (a = --*b)) 2018-09-27 19:26:08 +02:00
IOBYTE 33b74a04ab Add union support to template simplifier. (#1398) 2018-09-26 06:23:12 +02:00
orbitcowboy 2bbe73e04a
Fixed compiler warning from VS2017: testsuppressions.cpp(450): warning C4458: declaration of 'errmsg' hides class member. (#1397) 2018-09-25 17:19:25 +02:00
orbitcowboy 879803c90f gnu.cfg: Fixed FP (nullpointer) when third parameter of epoll_ctl is set to NULL. 2018-09-25 09:07:49 +02:00
rikardfalkeborn 5e120b567c isVariableDeclaration: Handle pointer to const pointer (#1395)
isVariableDeclaration did not handle pointer to const pointer, or
pointer to volatile pointer. This resulted in FPs in examples like the
following:

    class Fred {
        public:
        const char *const *data;
        const char *const *getData() { return data; };
    }

where cppcheck would say getData could be static, since it didn't
recognize const char *const *data as a variable declaration.
2018-09-25 06:19:26 +02:00
orbitcowboy 2f032d8fa7
Improved const correctness of local variables. (#1396)
* Improved const correctness of local variables.

* Running astyle [ci-skip].

* Removed duplicate 'const'-keyword.
2018-09-24 15:08:16 +02:00
Paul Fultz II 5bebeec224 Fix issue 8775: Dont follow aliased variables (#1390) 2018-09-24 06:37:47 +02:00
Daniel Marjamäki afe09f4d7a Temporarily comment out the followVariable() handling 2018-09-23 16:03:18 +02:00
Simon Martin 6bde2445a6 Ticket #8632: Parenthesize ternary operator operands containing < to avoid wrongly thinking a template instantiation is met. (#1389) 2018-09-23 10:27:38 +02:00
Simon Martin 915acac0b8 Ticket #8734: Skip static member variables in CheckUninitVar. (#1388) 2018-09-22 16:52:34 +02:00
Paul Fultz II d43cd56afd Show line number when suggesting std::transform (#1385) 2018-09-21 10:38:30 +02:00
orbitcowboy a26ac4d266 Running astyle. There is no functional change intended. 2018-09-21 08:53:09 +02:00
Paul Fultz II 1e347f6cde Initial check for recommending algorithms (#1352)
Add initial check for loop algorithms
2018-09-19 18:58:59 +02:00
shikamu 83cb0b3394 --suppress on line 0 (#1354)
Fixed --suppress on line 0
2018-09-18 12:58:14 +02:00
IOBYTE e9a44f70b2 Remove out of line member functions of instantiated template classes. (#1377)
* Remove out of line member functions of instantiated template classes.
2018-09-14 14:16:34 +02:00
Paul Fultz II 4e7ed9ea6e More robust checking for crashes in followVar (#1375)
More robust checking for crashes in followVar
2018-09-13 09:19:15 +02:00
Paul Fultz II eb07280075 Fix issue 8743: FP when derefencing iterators (#1376) 2018-09-12 17:33:53 +02:00
Paul Fultz II 90a29d986b Fix issue 8730: Dont follow variables with unknown symbols (#1374) 2018-09-12 17:30:18 +02:00
orbitcowboy 399a90c00e #8383: Segmentation fault on garbage code. Added regression test. 2018-09-10 16:28:32 +02:00
orbitcowboy 95da9f77c4 #8385: Segmentation fault on garbage code. Added regression test. 2018-09-10 16:24:09 +02:00
orbitcowboy bc84ce43ec #8265: Segmentation fault on garbage code. Added regression test. 2018-09-10 16:17:44 +02:00
amai2012 4b249877f1 #8709 Add stability regression test 2018-09-10 08:40:53 +02:00
Daniel Marjamäki 523a9c1c4a Fixed #8746 (Syntax error, AST broken (using a::operator=)) 2018-09-09 21:11:45 +02:00
Daniel Marjamäki 404eb6c746 Fixed #8745 (Syntax error: AST broken (or)) 2018-09-09 16:41:06 +02:00
Daniel Marjamäki 772939476d Remove inconclusive warnings about reading empty stl container. We have better ValueFlow-based checking. 2018-09-09 11:25:04 +02:00
Daniel Marjamäki b3f12fcc7e astyle formatting
[ci skip]
2018-09-09 07:10:37 +02:00
Paul Fultz II f4f3f81e8f Fix issue 8741: Require pure when following variables in isSameExpression (#1373) 2018-09-09 07:08:32 +02:00
Paul Fultz II fa40b821e6 Fix issue 8740: Add a pass to check for valid operators (#1372) 2018-09-08 21:10:34 +02:00
Daniel Marjamäki 509cb35168 astyle formatting
[ci skip]
2018-09-08 15:19:32 +02:00
tam do thanh 7ad09b44c3 Ticket 7792: Suppression both exit_code and syntaxError when call cppcheck suppressions (#1345) 2018-09-08 11:09:49 +02:00
Daniel Marjamäki d7de46f50e ValueFlow: Fix false positive for container size 2018-09-08 10:43:08 +02:00
Daniel Marjamäki 738fb1b23a Disabled CheckClass::checkCopyCtorAndEqOperator because of FP (#8388) 2018-09-08 09:14:02 +02:00
Paul Fultz II cb03b9883f Fix issue 8737: FP with identical inner condition due to followVar (#1371) 2018-09-07 20:16:38 +02:00
Paul Fultz II 5a2362b2a0 Fix issue 8738: Dont warn about multiconditions when value is known (#1369) 2018-09-07 15:02:34 +02:00
Paul Fultz II f7e7e9bd3c Fix issue 8736: Iterators to containers from different expressions (a.begin().x == b.begin().x) (#1370) 2018-09-07 07:08:02 +02:00
Paul Fultz II 2da958efb5 Fix issue 8722: Avoid duplicate messages due for followVar (#1367) 2018-09-06 06:55:36 +02:00
Paul Fultz II b46e25c18e Fix issue 8730: False positive: Opposite expression on both sides of && (#1366) 2018-09-05 18:07:01 +02:00
Simon Martin 1d85a78874 Ticket #8654: Properly setup links for variadic template bases. (#1357) 2018-09-05 14:10:56 +02:00
Paul Fultz II 08f301a0de Reenable followVar (#1363)
Reenable followVar
2018-09-05 05:53:33 +02:00
Daniel Marjamäki c6d43506b6 ValueFlow: Fix FP in switch 2018-09-04 20:28:48 +02:00
Daniel Marjamäki 3a8bdad20a Fixed #8232 (segmentation fault on valid C++ code in isOppositeCond()) 2018-09-04 18:10:31 +02:00
orbitcowboy 361ae311f6 cmdlineparser: Stop processing in case an invalid path for --includes-file=<PATH> and --config-excludes-file=<PATH> is provided. 2018-09-04 16:37:43 +02:00
Daniel Marjamäki 5afb755a3c SymbolDatabase: Fix variable matching 2018-09-04 06:39:02 +02:00