Commit Graph

22141 Commits

Author SHA1 Message Date
Paul Fultz II 61d847cac2
Fix issue 9637: false positive: Condition 'i<2U' is always true (#2536) 2020-02-15 07:57:43 +01:00
Daniel Marjamäki e04b9fe4a4 Remove unused functions 2020-02-14 20:37:33 +01:00
Daniel Marjamäki 0faea7ade3 GUI: ensure safeChecks.classes option is saved 2020-02-14 17:42:47 +01:00
Daniel Marjamäki 332279326f checkVirtualFunctionCallInConstructor; Check should be 'style' since there is no UB. Disabled the check temporarily, it should use CTU to determine if the class is a base class 2020-02-14 17:10:12 +01:00
Daniel Marjamäki e31b2f8b73 SymbolDatabase; Set smart pointer type in Variable valueType 2020-02-14 09:40:27 +01:00
Daniel Marjamäki 5f4a900f88 astyle formatting
[ci skip]
2020-02-13 17:04:05 +01:00
Paul Fultz II 7368a54629
Add generic valueflow forward analysis (#2511) 2020-02-13 16:27:06 +01:00
amai2012 c472322aad
Add GitHub actions (#2535)
* Initial version of GitHub actions script: compile cppcheck and "make check" on ubuntu
2020-02-13 09:16:53 +01:00
Daniel Marjamäki 1b66820cdb Revert "remove BUG_HUNTING_UNINIT conditionals"
This reverts commit 07a251d783.
2020-02-12 18:54:07 +01:00
Daniel Marjamäki 3ec03b8915 Fixed #9571 (False positive: containerSize) 2020-02-12 18:53:36 +01:00
Daniel Marjamäki 3675f49a53 astyle formatting
[ci skip]
2020-02-12 18:52:50 +01:00
Georgy Komarov 2138091fa3
misra.py: Fix rule 20.2 false negative (#2534) 2020-02-12 17:11:56 +01:00
Daniel Marjamäki cea17acd92 CLI: A --bug-hunting flag is needed for the tests 2020-02-12 16:30:18 +01:00
Georgy Komarov 403a61bc11
misra.py: Handle spaces in directive arguments (#2532) 2020-02-11 20:59:11 +01:00
Daniel Marjamäki 099dd57eb8 Fixed #9625 (false negative: misra-c2012-13.1) 2020-02-11 18:00:41 +01:00
Daniel Marjamäki 0bf9858d57 compiling; you can put z3 files in externals/z3 2020-02-11 17:42:40 +01:00
Dmitry-Me 25deb996e9 Improve test coverage for matching paths 2020-02-11 18:19:39 +03:00
Paul Fultz II d858bfc338
Fix issue 9599: False positive: Using object that points to local variable that may be invalid (#2530)
* Fix issue 9599: False positive: Using object that points to local variable that may be invalid

* Improve tests

* Skip else
2020-02-11 11:45:10 +01:00
Paul Fultz II e55ddacd18
Fix issue 9597: False positive: Reference to temporary returned if explicitly casted to base class (#2531) 2020-02-11 11:41:41 +01:00
Georgy Komarov 583d5e5958
misra.py: Add standard library functions for C90 and C99 (#2524)
This is required to add additional analysis for some MISRA rules.

This commit improve R21.1 check and close trac ticket 9603.
2020-02-11 11:10:54 +01:00
Daniel Marjamäki 07a251d783 remove BUG_HUNTING_UNINIT conditionals 2020-02-10 21:43:06 +01:00
Daniel Marjamäki a7f57c2cb5 GUI: Improved 'Safe functions' 2020-02-10 21:07:14 +01:00
Daniel Marjamäki f31447943c CLI: Remove experimental --safe-classes, --safe-functions, --bug-hunting, --debug-bug-hunting 2020-02-10 20:27:25 +01:00
Daniel Marjamäki e4250f890e GUI: Show bughunting report 2020-02-10 20:24:36 +01:00
Daniel Marjamäki 4e2e944eb9 GUI: ProjectFileDialog, first tab should be activated first 2020-02-10 18:22:52 +01:00
Paul Fultz II 8fa7dd0fe0
Fix issue 9595: False positive: Using pointer to temporary doesn't account for const ref extended temporary lifetimes (#2525) 2020-02-10 18:01:11 +01:00
Daniel Marjamäki 125c4832cd appveyor: download and install z3 so the gui can be built 2020-02-10 11:19:18 +01:00
Georgy Komarov 0ff23dbd0b misra.py: Handle more cases in Rule 20.3 check (#2529)
This commit add two additional cases for rule 20.3:

1. Support violations in the following format: `#include file.h`
2. Better multiline include directives and inline comments support.

See added test cases for examples.
2020-02-10 08:56:26 +01:00
Daniel Marjamäki bb701fd8be GUI: Tweak ProjectFileDialog: Bug hunting, safe class checking 2020-02-09 21:02:28 +01:00
Georgy Komarov f438cc6105
misra.py: Fix rule 21.1 false positives (#2526)
According MISRA standard, rule 21.1 should hanlde define/undef
directives only. There are no mentions of other C identifiers in the
standard document.
2020-02-09 16:22:26 +01:00
Daniel Marjamäki 58465e6254 AppVeyor: Do not build gui for now because of missing z3 library 2020-02-09 11:22:49 +01:00
IOBYTE 4d58d9fc87
fix daca chromium crash (#2527) 2020-02-09 11:19:36 +01:00
Rikard Falkeborn b1c6f2946a
Fix redundant FP assignment with unsigned zero (#2521)
* Refactor isNullOperand out of FwdAnalysis

* Improve isNullOperand

* Fix redundantAssignment FP with unsigned zero

* isNullValue check number

* Enhance isNullOperand to handle c++ casts

Also handle cast of NULL.
2020-02-09 11:16:08 +01:00
Mathias Buhr 60ada656a0
Allow filtering when using --project (#2522) 2020-02-09 10:51:29 +01:00
Georgy Komarov 6d4eff46be
misra.py: Fix false negative for rule 20.4 (#2528)
Define different sets of reserved keywords for C90 and C99.
This will fix false negative for compliant example, defined in MISRA
document, and close trac 9506.
2020-02-09 10:46:13 +01:00
Dmitry-Me e9b7e7811b Remove unreachable code and repeated computation 2020-02-05 18:20:43 +03:00
Daniel Marjamäki 59635e2706 Travis: install z3 library 2020-02-05 15:53:50 +01:00
Daniel Marjamäki 359cbdc1eb GUI: Tweak ProjectFileDialog 2020-02-05 14:45:29 +01:00
Daniel Marjamäki 25b5304efc GUI: Simple first hack to allow bughunting in the GUI 2020-02-04 21:20:43 +01:00
Daniel Marjamäki ca3095746c Fixed #9594 (False positive: Using argument that points at uninitialized variable when write only) 2020-02-04 18:56:18 +01:00
Dmitry-Me c8df734c07 Merge overlapping patterns 2020-02-04 18:35:30 +03:00
Dmitry-Me 84f65c40a7 Improve test coverage for templates with comparison in default value 2020-02-03 18:36:51 +03:00
Rikard Falkeborn b13ae83845
donate_cpu: Use with ... as (#2520) 2020-02-03 10:27:32 +01:00
Rikard Falkeborn 488bc9997c
Improve isSameExpression for same valued literals with followvar (#2519)
It allows (for example) cppcheck to detect that the lhs and the rhs are
the same in the following example:

	double g()
	{
        	double a = 1e1
	        return a & 10.0;
	}
2020-02-03 09:35:24 +01:00
Rikard Falkeborn 0d361f8a2e
test-my-pr: Retry if failed to get package (#2515) 2020-02-02 18:00:36 +01:00
Rikard Falkeborn bbfd10a69f
Bugfix Mathlib::isNullValue for hexadecimal numbers (#2517) 2020-02-02 16:40:36 +01:00
orbitcowboy cef06741e5 Merge branch 'master' of https://www.github.com/danmar/cppcheck 2020-02-02 16:37:05 +01:00
orbitcowboy 4ac3f3172c wxwidgets.cfg: Added support for more interfaces. 2020-02-02 16:36:44 +01:00
Rikard Falkeborn 60c3d4c482
daca@home: Add links to packages on time page (#2518)
Also, increase the size of the package field to match the setting for
the other pages (some packages are too small to fit at the moment).
2020-02-02 16:36:19 +01:00
Daniel Marjamäki a9f55f4985 CLI: add -isystem include paths when running Clang 2020-02-02 16:35:42 +01:00