Commit Graph

27504 Commits

Author SHA1 Message Date
Daniel Marjamäki 6a8f787915
Fix (simplifyTypedef: not handled properly when typedef and enum constant has same name) () 2023-10-01 21:26:54 +02:00
chrchr-github 6773cdb34b
Fix syntaxError due to bad typedef simplification () 2023-09-28 19:26:12 +02:00
chrchr-github 033cf64961
Avoid const_cast () 2023-09-28 18:20:43 +02:00
Daniel Marjamäki ed5532c2a7
Fix (False positive: null pointer, array zero initialization) () 2023-09-28 15:18:08 +02:00
Daniel Marjamäki c4fe5ac8b7
Fix (FP: uninitvar, address of variable is casted to uintptr_t that is passed to function) () 2023-09-28 13:47:11 +02:00
Daniel Marjamäki db5f75f741
manual: Add manual-premium.md for the Cppcheck Premium manual () 2023-09-28 13:30:58 +02:00
chrchr-github 63b76d2266
Fix valueFlowBailoutIncompleteVar with ptr to ptr (refs ) () 2023-09-28 10:36:18 +02:00
chrchr-github 73d305ea46
Fix crash: crashes in release builds if cppcheck build dir is used () 2023-09-27 16:44:22 +02:00
Oliver Stöneberg ca20152e51
findDependencies.cmake: use `FindPython` instead of deprecated `FindPythonInterp` ()
This fixes the following warning with CMake 3.27:
```
CMake Warning (dev) at cmake/findDependencies.cmake:42 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  CMakeLists.txt:15 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.
```
2023-09-27 10:06:03 +02:00
chrchr-github e928f2b5aa
Fix valueFlowBailoutIncompleteVar with new (refs ) () 2023-09-26 21:39:07 +02:00
Oliver Stöneberg 3774d46303
TestCmdlineParser: store messages in logger class instead of utilizing the redirect () 2023-09-26 21:38:15 +02:00
chrchr-github 4ba19c42ba
Bump simplecpp (fix ) () 2023-09-26 15:58:16 +02:00
Oliver Stöneberg a3ff6d53c4
added `-Werror` to pytest calls and fixed reported warnings () 2023-09-26 15:31:37 +02:00
Oliver Stöneberg a9952d9da6
CppCheck: avoid expensive `std::ostringstream` usage in `checkFile()` ()
Scanning `common` from `xrdp` project with `DISABLE_VALUEFLOW=1` and
`-D__GNUC__ --addon=misra`:

Clang 16 `627,748,337` -> `541,852,912`
2023-09-26 14:22:52 +02:00
chrchr-github f037edf586
Fix FN Moved value when using {} to initialize () 2023-09-26 10:04:22 +02:00
Oliver Stöneberg 9f96803f62
TestCheck: added missing registration () 2023-09-26 10:03:53 +02:00
chrchr-github 99e38cf8f8
Partial fix for FN detect always false/true comparison of function with constant () 2023-09-25 22:18:07 +02:00
Oliver Stöneberg 3fd00c19df
perform logging in `CmdLineParser` through an interface ()
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 () 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 () 2023-09-25 13:37:24 +02:00
Oliver Stöneberg e6e273645d
donate_cpu_lib.py: increased the amount of upload tries () 2023-09-22 19:41:52 +02:00
chrchr-github bba96c5c8f
Fix valueFlowConditionExpressions bailout for C++ casts (refs ) () 2023-09-22 18:19:36 +02:00
Oliver Stöneberg c527af9042
donate-cpu-server.py: fixed "top x" reports / some cleanups ()
This broke with a late variable name cleanup I did in
`check_library_report()` after testing it locally.
2023-09-22 15:18:16 +02:00
Oliver Stöneberg ba23b20264
donate-cpu-server.py: filtered out various outdated and undesired (diff) results from reports / cleanups () 2023-09-22 12:17:33 +02:00
chrchr-github b745d9ad6e
Fix Improve unknownMacro message: int () 2023-09-22 10:16:21 +02:00
Oliver Stöneberg 6fcf11b831
donate-cpu-server.py: added `pkgs` query parameter to `check_library-*`, `incomplete_var-*` and `unknown_macro-*` reports ()
This also fixes the missing results for `;` and filters out outdated
results.
2023-09-21 15:25:18 +02:00
chrchr-github dc59543348
Fix Improve unknownMacro message () 2023-09-21 00:28:49 +02:00
chrchr-github 57bbb17f3b
Fix debug: Executable scope 'x' with unknown function. () 2023-09-20 17:18:00 +02:00
chrchr-github dc19916966
Fix valueFlowConditionExpressions bailout for library function (refs ) () 2023-09-20 15:49:13 +02:00
Oliver Stöneberg 4af2f991c2
removed unused `daca.cfg` ()
It appears this file was never used. And we shouldn't. Although this
will help with reducing warning and improving coverage in daca it will
not improve the analysis for the user. It might also mask issues.
2023-09-20 14:46:12 +02:00
Oliver Stöneberg f49fedb2ad
fixed (FN unusedFunction for method with inline implementation) ()
Co-authored-by: chrchr-github <78114321+chrchr-github@users.noreply.github.com>
2023-09-20 14:45:44 +02:00
Andy Holmes da09580dde
gtk.cfg: add G_DEFINE_QUARK() () 2023-09-20 11:58:19 +02:00
Oliver Stöneberg 5ae136a1be
donate-cpu-server.py: added "top x" report for `unknownMacro` () 2023-09-20 11:23:04 +02:00
Oliver Stöneberg 21e001cd1a
refs - error out in `TestFileLister::recursiveAddFiles()` instead of looping infinitely when repository root directory is not found ()
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 () 2023-09-20 10:40:57 +02:00
Paul Fultz II 58a7519cbb
Fix 11992: FN (regression): uninitvar () 2023-09-20 06:43:58 +02:00
Daniel Marjamäki 3089fc393b
Fix (Filelister: Unclear error 'finding files failed (error: 3)') () 2023-09-19 15:36:34 +02:00
chrchr-github c6b3c56174
Improve findEnumerator() (refs ) () 2023-09-19 11:45:59 +02:00
Oliver Stöneberg 176edbd22c
added `--strict` and `-vv` to pytest calls () 2023-09-18 13:57:27 +02:00
Daniel Marjamäki e611b18ffc AUTHORS: Add alucarded [skip ci] 2023-09-18 13:55:53 +02:00
Tomasz Edward Posluszny b6f60ad952
Support importing projects with project-name () 2023-09-18 13:54:20 +02:00
chrchr-github 10c1ac977c
Fix findEnumerator() with nested enum (refs ) () 2023-09-18 12:09:59 +02:00
chrchr-github 640b561633
Fix FP passedByValue when variable is moved from () 2023-09-17 22:32:35 +02:00
chrchr-github 0c51977f86
Fix valueFlowBailoutIncompleteVar for cast and template args (refs ) () 2023-09-16 13:03:14 +02:00
Paul Fultz II df4457e895
Use intrinsics for source location if available ()
Sometimes the compiler supports the intrinsic even if the C++ runtime
doesnt yet.
2023-09-15 17:18:08 +02:00
chrchr-github 50ba5061c7
Fix MathLib error on user defined literals ()
Based on , 

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
Daniel Marjamäki 79e8735d1a
cli: update --help output, premium has full cert c++ coverage () 2023-09-14 15:59:06 +02:00
chrchr-github 5a21851bb7
Fix internalAstError with using declaration () 2023-09-14 12:14:08 +02:00
chrchr-github 775af5ec70
Add test for simplecpp#314 () 2023-09-14 09:41:39 +02:00
Paul Fultz II e6632d93e3
Fix 11983: False positive: uninitialized variable () 2023-09-13 23:27:08 +02:00