Commit Graph

12623 Commits

Author SHA1 Message Date
chrchr-github 787da43dc9
Fix #12036 FN knownConditionTrueFalse comparing enum with number (#5510) 2023-10-05 18:15:18 +02:00
Daniel Marjamäki a52d2a23a0
Fix #12018 (False positive: null pointer, multiple arguments) (#5509) 2023-10-05 15:08:25 +02:00
chrchr-github d9a8909d2a
Fix #11408 debug: Function::addArguments found argument 't' with varid 0 (#5507) 2023-10-05 10:01:46 +02:00
Daniel Marjamäki 6a8f787915
Fix #12026 (simplifyTypedef: not handled properly when typedef and enum constant has same name) (#5500) 2023-10-01 21:26:54 +02:00
chrchr-github 6773cdb34b
Fix #12014 syntaxError due to bad typedef simplification (#5493) 2023-09-28 19:26:12 +02:00
Daniel Marjamäki ed5532c2a7
Fix #12019 (False positive: null pointer, array zero initialization) (#5495) 2023-09-28 15:18:08 +02:00
Daniel Marjamäki c4fe5ac8b7
Fix #12012 (FP: uninitvar, address of variable is casted to uintptr_t that is passed to function) (#5494) 2023-09-28 13:47:11 +02:00
chrchr-github 63b76d2266
Fix valueFlowBailoutIncompleteVar with ptr to ptr (refs #10045) (#5488) 2023-09-28 10:36:18 +02:00
chrchr-github 73d305ea46
Fix #12013 crash: crashes in release builds if cppcheck build dir is used (#5489) 2023-09-27 16:44:22 +02:00
chrchr-github e928f2b5aa
Fix valueFlowBailoutIncompleteVar with new (refs #10045) (#5487) 2023-09-26 21:39:07 +02:00
Oliver Stöneberg 3774d46303
TestCmdlineParser: store messages in logger class instead of utilizing the redirect (#5482) 2023-09-26 21:38:15 +02:00
chrchr-github f037edf586
Fix #11440 FN Moved value when using {} to initialize (#5479) 2023-09-26 10:04:22 +02:00
Oliver Stöneberg 9f96803f62
TestCheck: added missing registration (#5484) 2023-09-26 10:03:53 +02:00
chrchr-github 99e38cf8f8
Partial fix for #10968 FN detect always false/true comparison of function with constant (#5480) 2023-09-25 22:18:07 +02:00
Oliver Stöneberg 3fd00c19df
perform logging in `CmdLineParser` through an interface (#5478)
This is in preparation of avoiding accessing `std::cout` directly as
well as streamlining and improving the logging during the settings
parsing. There are no functional changes yet.
2023-09-25 13:43:18 +02:00
Oliver Stöneberg 1959c85e34
test/cli/test-other.py: improved addon tests (#5469) 2023-09-25 13:39:17 +02:00
Oliver Stöneberg 3979ade9ea
got rid of test-only `Library` functions / avoid some more direct modifications of library data structures in test (#5468) 2023-09-25 13:37:24 +02:00
chrchr-github bba96c5c8f
Fix valueFlowConditionExpressions bailout for C++ casts (refs #10045) (#5472) 2023-09-22 18:19:36 +02:00
chrchr-github b745d9ad6e
Fix #12010 Improve unknownMacro message: int (#5473) 2023-09-22 10:16:21 +02:00
chrchr-github dc59543348
Fix #12006 Improve unknownMacro message (#5470) 2023-09-21 00:28:49 +02:00
chrchr-github 57bbb17f3b
Fix #11986 debug: Executable scope 'x' with unknown function. (#5463) 2023-09-20 17:18:00 +02:00
chrchr-github dc19916966
Fix valueFlowConditionExpressions bailout for library function (refs #10045) (#5461) 2023-09-20 15:49:13 +02:00
Oliver Stöneberg f49fedb2ad
fixed #11483 (FN unusedFunction for method with inline implementation) (#5457)
Co-authored-by: chrchr-github <78114321+chrchr-github@users.noreply.github.com>
2023-09-20 14:45:44 +02:00
Oliver Stöneberg 21e001cd1a
refs #11993 - error out in `TestFileLister::recursiveAddFiles()` instead of looping infinitely when repository root directory is not found (#5462)
Not a proper fix yet but at least it prevents the hang and gives some
feedback.
2023-09-20 10:49:00 +02:00
Oliver Stöneberg a43b55a0ca
Improved addon execution errorhandling (#5451) 2023-09-20 10:40:57 +02:00
Paul Fultz II 58a7519cbb
Fix 11992: FN (regression): uninitvar (#5465) 2023-09-20 06:43:58 +02:00
chrchr-github c6b3c56174
Improve findEnumerator() (refs #10045) (#5459) 2023-09-19 11:45:59 +02:00
Tomasz Edward Posluszny b6f60ad952
Support importing projects with project-name (#5456) 2023-09-18 13:54:20 +02:00
chrchr-github 10c1ac977c
Fix findEnumerator() with nested enum (refs #10045) (#5454) 2023-09-18 12:09:59 +02:00
chrchr-github 640b561633
Fix #11995 FP passedByValue when variable is moved from (#5455) 2023-09-17 22:32:35 +02:00
chrchr-github 0c51977f86
Fix valueFlowBailoutIncompleteVar for cast and template args (refs #10045) (#5452) 2023-09-16 13:03:14 +02:00
chrchr-github 50ba5061c7
Fix #11438 MathLib error on user defined literals (#5448)
Based on #4701, #5418

A helper function for the `isdigit()` test should be introduced on the
simplecpp side.

Co-authored-by: gerboengels <github@gerbo.org>
2023-09-15 10:00:00 +02:00
chrchr-github 5a21851bb7
Fix #11981 internalAstError with using declaration (#5446) 2023-09-14 12:14:08 +02:00
chrchr-github 775af5ec70
Add test for simplecpp#314 (#5438) 2023-09-14 09:41:39 +02:00
Paul Fultz II e6632d93e3
Fix 11983: False positive: uninitialized variable (#5443) 2023-09-13 23:27:08 +02:00
Paul Fultz II a1078f446a
Fix 11980: False positive returnDanglingLifetime returning pointer to stack array as std::string (by way of struct return value constructor) (#5445) 2023-09-13 21:26:37 +02:00
chrchr-github 844ed2bf22
Fix #11421 FP shiftTooManyBits with 64bit enum (#5406) 2023-09-13 17:59:47 +02:00
Daniel Marjamäki 7d1423c5fb
Fix #11975 (SymbolDatabase: findFunction does not find the correct function) (#5440) 2023-09-13 13:37:57 +02:00
chrchr-github 523c41a60b
Fix #11978 debug: Executable scope 'x' with unknown function. (#5437) 2023-09-13 11:39:09 +02:00
Oliver Stöneberg 98ce46a3e5
fixed #11919 - Removed deprecated command-line options `--template <template>` and `--template-format=<template>` (#5439) 2023-09-12 22:46:40 +02:00
chrchr-github 18ee859737
Fix #11976 FP incorrectStringBooleanError in assert (#5415) 2023-09-12 10:05:51 +02:00
Oliver Stöneberg e7dd490fed
adjusted tests to reduce the amount of `friend` declarations necessary (#5435)
We were calling several interface functions through their inherited
classes instead of using the base classes requiring us to add `friend`
declarations to make the implementations accessible. This adjusts
several of those cases.
2023-09-11 20:26:22 +02:00
chrchr-github 1b5b74d1f3
Fix FP knownArgument (f'up to #11927) (#5434) 2023-09-11 20:02:00 +02:00
chrchr-github c6721688e2
Fix #11929 FP knownPointerToBool with dynamic_cast (#5416) 2023-09-11 18:04:36 +02:00
chrchr-github cbbf500cd4
Fix valueFlowBailoutIncompleteVar for init list (refs #10045) (#5433) 2023-09-11 16:49:39 +02:00
chrchr-github aa281501c9
Fix #11923 FN unreadVariable (regression) (#5409) 2023-09-11 11:36:03 +02:00
Oliver Stöneberg 64cd09ab62
fixed #11917 (Default to `native` platform in Windows builds) (#5428) 2023-09-11 11:08:23 +02:00
Daniel Marjamäki 87719121bd
Fixed #11908 (SymbolDatabase: array not parsed properly 'int (**rs)[32]') (#5430) 2023-09-10 20:58:30 +02:00
chrchr-github f9b18bc9d8
Fix FP (regression): Resource handle 'fd' freed twice. [doubleFree] (#5424) 2023-09-10 20:32:55 +02:00
Oliver Stöneberg 91070ca794
utils.h: added `startsWith()` and started using it (#5381)
This makes the code much more readable. It also makes it less prone to
errors because we do not need to specify the length of the string to
match and the returnvalue is clear.

The code with the bad returnvalue check was never executed and I added a
test to show that.
2023-09-08 19:30:25 +02:00