Commit Graph

10858 Commits

Author SHA1 Message Date
Daniel Marjamäki ef0af26d9f missingReturn; Fixed FP when function is declared in macro 2021-07-08 13:14:11 +02:00
Daniel Marjamäki 00a9671f46 misra: implement 8.1 2021-07-07 13:34:55 +02:00
Paul Fultz II 3b9c399f72
Fix 10338: Hang/Crash in valueflow (#3328) 2021-07-07 08:20:32 +02:00
orbitcowboy 7d7241b076 #9772: FP uninitvar: in cppcheck 2.1; Added a regression to test 2021-07-06 14:24:07 +02:00
Maksim Derbasov 6b8d0be431
New check: [perf] Copy elision optimization can't be applied for `return std::move(local)` (#3281) 2021-07-06 08:07:46 +02:00
Daniel Marjamäki 6234b5438e New check: Writing overlapping data, detect undefined behavior 2021-07-05 22:07:41 +02:00
Daniel Marjamäki 6cb8f87798 missing return; fixed false positive for 'return {};' 2021-07-04 19:59:22 +02:00
Daniel Marjamäki 4fd33ef2b5 test/cli: fixed missing returns in test cases 2021-07-04 18:25:19 +02:00
Daniel Marjamäki 036c71d967 Fixed #5462 (non-void function does not return a value) 2021-07-04 11:27:57 +02:00
Daniel Marjamäki c489626167 updated copyright year 2021-07-04 08:09:11 +02:00
Paul Fultz II fb9d659e25
Fix 10326: Regression: ValueFlow; Wrong Uninit value after do while (#3312) 2021-07-03 09:12:26 +02:00
Armin Müller fc90598077
Typos found by running "codespell" (#3324) 2021-07-02 17:41:51 +02:00
Robert Reif 68898e2be0
fix #10335 (Type alias remains unknown with using) (#3323)
Co-authored-by: Robert Reif <reif@FX6840>
2021-07-02 06:19:26 +02:00
Daniel Marjamäki 1a5449cbeb Fixed #10327 (ValueFlow; Wrong Uninit value in called function) 2021-07-01 22:08:00 +02:00
Daniel Marjamäki 869eac5670 astyle formatting 2021-07-01 21:09:32 +02:00
chrchr-github 7a51fc8232
Add regression test for #8942 (#3321) 2021-07-01 21:09:06 +02:00
chrchr-github 9be88a06fe
Add regression test for #9176 (#3319) 2021-07-01 13:58:00 +02:00
Daniel Marjamäki e1cff1d1ef Fixed #10334 (AST: hang with c++ initializer and emplace_back) 2021-06-30 21:40:45 +02:00
Daniel Marjamäki e50f7a3e09 astyle formatting 2021-06-30 20:27:35 +02:00
chrchr-github 5b1420ff64
Add regression test for #10215 (#3317) 2021-06-29 19:42:47 +02:00
Daniel Marjamäki 1783fd1bba duplicateBreak; Allow extra return that clarifies for tool(s) that function does not continue 2021-06-29 11:17:12 +02:00
Daniel Marjamäki 05df31c12a Fixed unit tests 2021-06-27 09:04:47 +02:00
Daniel Marjamäki 2a2e071a85 Tokenizer::simplifyAttribute; Set function attribute for function pointer 2021-06-26 14:23:39 +02:00
Paul Fultz II 66956ed959
Fix 10323: Wrong known value. x!=0 does not mean that x==1 (#3308) 2021-06-26 09:16:45 +02:00
Paul Fultz II 508188df2b
Fix 10297: Regression; ValueFlow known value, sign conversion (#3307) 2021-06-26 09:16:04 +02:00
Daniel Marjamäki 9769afe434 knownConditionTrueFalse; avoid several warnings when nonzero expression is compared to see if it is positive or negative 2021-06-25 16:25:25 +02:00
Daniel Marjamäki 2f7f43e1f2 astyle formatting 2021-06-24 23:19:59 +02:00
chrchr-github 39f9bc7422
Fix #10304: std::distance() returns std::ptrdiff_t (#3297) 2021-06-24 23:19:29 +02:00
Paul Fultz II b13e44fce5
Fix 10309 and 10034: internalAstError with init lists (#3303) 2021-06-24 08:25:13 +02:00
Paul Fultz II 6e74fc64b9
Fix 10317: Regression: internalAstError on valid C++ code (#3302) 2021-06-24 08:22:03 +02:00
Paul Fultz II dd178c3ad9
Fix 10314: Possible nullPointerRedundantCheck false positive (#3298) 2021-06-19 13:59:48 +02:00
Paul Fultz II 5922d5178b
Fix 10321: Two flags confuse null pointer check (#3300) 2021-06-19 13:58:57 +02:00
Paul Fultz II eb7b225fc1
Fix 10119: ValueFlow; object member is not uninitialized. happens when there is static member also. (#3299) 2021-06-19 13:58:18 +02:00
Daniel Marjamäki a7707a457d astyle formatting 2021-06-14 07:39:41 +02:00
shane a5664c3e49 allow token iteration in range for 2021-06-14 07:39:01 +02:00
Daniel Marjamäki 03445c01c1 Fix false positives when class might inherit from VCL TObject class 2021-06-13 18:56:04 +02:00
Daniel Marjamäki 7dbca470f7 Suppressions; Fixed problem with cppcheck build dir is used 2021-06-12 18:19:00 +02:00
Daniel Marjamäki 118ad67645 testrunner: return value in non-void functions 2021-06-12 16:43:48 +02:00
Daniel Marjamäki 83d406806f CI; Fixed problems in windows paths 2021-06-12 12:45:31 +02:00
Daniel Marjamäki 4a4808e0ff ImportProject; Try to use relative paths 2021-06-12 11:10:35 +02:00
Paul Fultz II f55a4563f9
Fix 10308: danglingTemporaryLifetime confused by function parameter (#3292) 2021-06-09 09:21:03 +02:00
Paul Fultz II f3a33ea330
Fix 10294: ValueFlow: Wrong <Uninit> value below loop (#3291) 2021-06-09 09:20:43 +02:00
Daniel Marjamäki 3c3435dd10 Fix bug in Tokenizer::simplifyVarDecl 2021-06-06 08:13:40 +02:00
Paul Fultz II 668b88d7c0
Fix 10284: False positive; valueFlowBeforeCondition does not seem to care about increment (#3287) 2021-06-04 21:40:57 +02:00
Paul Fultz II a14922ed85
Fix 10238: FP knownConditionTrueFalse std::string from const char* assumed non-empty (#3288) 2021-06-04 17:22:05 +02:00
Paul Fultz II 537fb5bcd9
Fix 10264: FP invalidContainer when address of container is passed inside struct (#3286) 2021-06-04 17:20:47 +02:00
Paul Fultz II b23c5aa742
Fix 10023: ValueFlow; Wrong result of post-increment in reverse analysis (#3289) 2021-06-04 17:20:21 +02:00
Paul Fultz II 486e440c4a
Fix 10298: ValueFlow: Wrong known value, 'x == -1' implicit unsigned cast for rhs (#3277) 2021-06-04 17:17:41 +02:00
Paul Fultz II 95c872b1ec
Fix todo test for returning a dangling reference (#3284) 2021-06-04 17:15:39 +02:00
orbitcowboy f626035963 std.cfg: Added support for more interfaces 2021-06-03 08:07:53 +02:00