Daniel Marjamäki
f6c98a0999
Fix Cppcheck self check warning
2021-01-09 11:14:41 +01:00
Georgiy Komarov
35a42cd0fe
cppcheckdata: Make the source files for configuration public ( #3030 )
...
Extend CppcheckData class API to make the list of source files public.
This can be used by custom addons.
2021-01-08 22:59:58 +01:00
Paul Fultz II
c267d85640
Add generic valueflowBeforeCondition ( #3001 )
2021-01-08 22:55:04 +01:00
shaneasd
e931d609e7
improve cppunit macros ( #3025 )
2021-01-08 22:48:28 +01:00
Daniel Marjamäki
4b5aedbbab
Fixed #10066 (FP: duplicateExpression clangimport)
2021-01-08 22:30:06 +01:00
Paul Fultz II
3b5c558414
Fix issue 10076: ValueFlow: False positive after address of var is taken 'T t = {{&var}};' ( #3027 )
2021-01-08 10:29:32 +01:00
Rikard Falkeborn
bedf3118ef
library: Refactor to use enum class ( #3026 )
2021-01-08 10:29:01 +01:00
Georgiy Komarov
13b8ee8871
cppcheckdata: Use instance attributes in Cppcheckdata ( #3029 )
...
This commit makes CppcheckData class to use instance attributes instead
of class attributes.
Since class attributes are mutable (list), when you append to them, they
don't promote to instance variable which means when you call parsedump()
multiple times data just gets appended to them.
Found by samed on the forum:
https://sourceforge.net/p/cppcheck/discussion/general/thread/c6e1210ec2/
2021-01-08 10:25:51 +01:00
orbitcowboy
b6f4961e4a
windows.cfg: Add config for toupper/tolower
2021-01-08 09:20:23 +01:00
Rikard Falkeborn
a8a0dbec26
cfg: Add config for toupper/tolower ( #3028 )
2021-01-08 08:34:09 +01:00
Georgiy Komarov
82f51bd523
misra: Fix crash on rule 9.x ( #3024 )
...
Closes ticket #10084
2021-01-07 15:04:12 +01:00
orbitcowboy
2b22120d22
wxwidgets.cfg: Added support for more interfaces, found by daca@home
2021-01-07 10:01:51 +01:00
orbitcowboy
a576048da8
wxwidgets.cfg: Added support for more interfaces, found by daca@home
2021-01-07 10:00:28 +01:00
orbitcowboy
7452a01fb8
wxwidgets.cfg: Added support for more interfaces, found by daca@home
2021-01-07 09:57:36 +01:00
orbitcowboy
5f0a406e5e
wxwidgets.cfg: Added support for more interfaces, found by daca@home
2021-01-07 09:54:15 +01:00
orbitcowboy
6cfd42305c
wxwidgets.cfg: Added support for more interfaces, found by daca@home
2021-01-07 09:41:16 +01:00
orbitcowboy
220597bc0b
wxwidgets.cfg: Added support for more interfaces, found by daca@home
2021-01-07 09:37:34 +01:00
IOBYTE
503a5dd441
fix #10081 (Hang: TemplateSimplifier::useDefaultArgumentValues) ( #3021 )
2021-01-06 23:06:50 +01:00
IOBYTE
cb02628c7c
fix #10075 (namespace alias changes variable name) ( #3020 )
2021-01-06 17:30:11 +01:00
IOBYTE
c085151eb0
fix exprengine.cpp:2833:18: debug: Executable scope 'executeAllFunctions' with unknown function. ( #3019 )
2021-01-06 17:29:23 +01:00
Rikard Falkeborn
50cdb6cbfc
Astyle: sync windows and linux folders ( #3016 )
2021-01-06 17:13:44 +01:00
Oliver Stöneberg
a7f0e91539
cppcheckexecutor.cpp: fixed stack-use-after-scope reported by ASAN ( #3018 )
2021-01-06 11:39:24 +01:00
Daniel Marjamäki
9e4e06a524
Clang import; Testing that token index is set properly
2021-01-06 11:19:14 +01:00
Daniel Marjamäki
0bd401c17b
ClangImport; Assign token indexes
2021-01-06 11:07:21 +01:00
Daniel Marjamäki
168db9351d
ClangImport; set exprid
2021-01-06 11:03:43 +01:00
Daniel Marjamäki
3a86262244
SymbolDatabase: Do not set definedType for global scope etc
2021-01-06 08:53:45 +01:00
IOBYTE
22b10f8987
fix token.cpp:745:19: debug: Executable scope 'getStrSize' with unknown function. ( #3015 )
2021-01-05 22:07:53 +01:00
Oliver Stöneberg
96704c9971
fixed and enabled some more clang-tidy warnings ( #3007 )
2021-01-05 17:51:32 +01:00
Paul Fultz II
e004731f1c
Fix issue 8650: ValueFlow: Track if pointer is created by '&' operator ( #3011 )
2021-01-05 16:56:38 +01:00
IOBYTE
8897ad3408
fix #10068 (typedef not replaced when namespace is involved) ( #3009 )
2021-01-05 16:53:56 +01:00
Paul Fultz II
f0b5668436
Fix issue 9890: ValueFlow: known value not found (variable is changed in path that returns) ( #3010 )
2021-01-05 16:49:08 +01:00
Paul Fultz II
a95c931da0
Fix issue 8501: false negative: (style) Opposite expression on both sides of ( #3012 )
2021-01-05 12:07:27 +01:00
Daniel Marjamäki
b3b7ecc7ea
Removed integerOverflowOptimization checking and merged functionality into invalidTestForOverflow
2021-01-05 11:38:19 +01:00
Daniel Marjamäki
abd6c00c82
Integer overflow; generalized checking for nonportable code
2021-01-04 19:43:05 +01:00
orbitcowboy
01c434f8bf
donate_cpu: Auto detect ntl-library
2021-01-04 16:28:05 +01:00
orbitcowboy
018d033af3
ntl.cfg: Added NTL (NTL: A Library for doing Number Theory) support. Reference: https://libntl.org/
2021-01-04 13:13:11 +01:00
orbitcowboy
02b714f6dc
Code formatting [ci skip]
2021-01-04 13:09:05 +01:00
Daniel Marjamäki
c546b244a9
ClangImport; throw exception if CXXForRangeStmt can't be imported
2021-01-04 10:15:09 +01:00
abhijit-sawant
a4a225203c
Fix #9938 (false positive: StlMissingComparison) ( #2989 )
2021-01-04 10:07:07 +01:00
Daniel Marjamäki
da198e0726
Fix Cppcheck self check warning; use reference to avoid data copying
2021-01-04 01:47:04 +01:00
Daniel Marjamäki
38aa0fa2f0
Signed integer optimisation; ensure expr is variable
2021-01-03 23:30:34 +01:00
Daniel Marjamäki
52491f1c53
Signed integer optimisations; Also warn about 'x+y<x'
2021-01-03 22:12:19 +01:00
Daniel Marjamäki
6375fb4f08
New check: Warn about nonportable code that can be optimised (signed integer overflow)
2021-01-03 21:03:07 +01:00
Daniel Marjamäki
208014bae9
checkIntegerOverflow: Remove bailout for shifts
2021-01-03 17:44:46 +01:00
IOBYTE
23da5c9815
fix #9885 (SymbolDatabase: function lookup fails calling variadic method) ( #3002 )
...
Co-authored-by: Robert Reif <reif@FX6840>
2021-01-03 11:17:32 +01:00
amai2012
76d5e6c7db
Remove macos-11.0 environment
...
See https://github.com/danmar/cppcheck/pull/2989#issuecomment-753591221
The environment currently is not reliable. Maybe because it's a preview only according to https://github.com/actions/virtual-environments/issues/1814 ?
2021-01-03 10:41:43 +01:00
Oliver Stöneberg
d59abfd977
fixed clang-tidy warnings ( #3006 )
...
* clang_tidy.cmake: added clang-tidy-11 to list of executables to look for
* .clang-tidy: disabled warnings we are (currently) not interested in
* fixed clang-tidy warnings
2021-01-02 23:10:27 +01:00
Oliver Stöneberg
fbf5858f76
fixed and enabled several clang-tidy warnings ( #2816 )
2021-01-02 19:10:25 +01:00
Rikard Falkeborn
f816cc8d48
runtests: Add -Wno-deprecated-declarations to CXX flags ( #3004 )
...
This avoids warnings when checking syntax of qt.cpp.
2021-01-02 10:02:16 +01:00
Rikard Falkeborn
d19454b935
Refactoring: Convert ValueType to enum class ( #3005 )
2021-01-02 09:30:00 +01:00