Commit Graph

27217 Commits

Author SHA1 Message Date
Daniel Marjamäki 107eea236f
Improved handling of alignas. alignas will not be removed from now on so we don't loose this information. () 2023-05-24 10:33:53 +02:00
chrchr-github 94b6c87049
Fix FP unreadVariable with brace-init () 2023-05-23 20:21:02 +02:00
Daniel Marjamäki 211ab3dd63 AUTHORS: Add rwiesenfarth 2023-05-23 12:45:54 +02:00
Rainer Wiesenfarth d1781a8cfb
Fix Limit check to selected VS configurations does not work ()
Fix  Limit check to selected VS configurations does not work
2023-05-23 12:44:03 +02:00
Daniel Marjamäki 956bb3ce8c
test-my-pr: use --packages-path if you want to check packages in a path () 2023-05-23 09:51:51 +02:00
chrchr-github 6d2662b8a2
Fix FN (error) Memory leak - assignment to reference of a pointer ()
* Fix  false negative: (error) Memory leak - assignment to reference of a pointer

* Comment

* Run tests as C++

* Add TODOs

* Bail out for local references
2023-05-23 06:29:20 +02:00
Stefan Hagen 9e8cb6904a
[nit] Fixed lib/tokenize.cpp:2815:2: warning: extra ‘;’ [-Wpedantic] ()
Single character fix removing extra semi colon.
2023-05-23 06:27:25 +02:00
chrchr-github 33f728df14
Fix Hang in simplifyTypedef() with extra parentheses ()
* Fix   Hang in simplifyTypedef() with extra parentheses

* Amend test
2023-05-23 06:26:22 +02:00
chrchr-github 00733893e0
Fix "this->" confuses non void return check () 2023-05-22 20:23:09 +02:00
chrchr-github 78182d4773
Fix FN constVariablePointer ()
* Fix FN constVariablePointer

* Fix FP

* Add const

* Fix tests

* Add const
2023-05-22 19:53:51 +02:00
chrchr-github 8eabf5c211
Fix FN unused variable not detected when there is lambda ()
* Fix  FN unused variable not detected when there is lambda

* Format

* Fix tests

* Check lambda return

* Add test

* Undo, add test

* simpleMatch()

* Rename test
2023-05-22 07:39:57 +02:00
chrchr-github e621f721fc
Use library to get deallocation function ()
* Use library to get deallocation function

* Add suppressions

* Amend

* Remove suppression

* More getDeallocFuncInfo()

* Fix suppressions

* Fix suppression
2023-05-21 14:01:14 +02:00
chrchr-github d30f8e18f7
Partial fix for FN functionConst with non-dereferenceable pointer access () 2023-05-21 14:00:24 +02:00
chrchr-github ba57e15cb2
Fix Warn when C++ code is scanned as C (prevent FPs) ()
* Fix  Warn when C++ code is scanned as C (prevent FPs)

* Don't throw for operators

* Detect reference variables

* Fix tests

* Fix compilation

* Fix test

* Fix another test

* Use strAt()
2023-05-21 13:59:49 +02:00
Daniel Marjamäki f72db74817
Fixed (FP overlappingWriteUnion with anonymous struct in union) () 2023-05-20 10:34:42 +02:00
chrchr-github e6576dd949
Fix internal error: converting '1f' to integer failed ()
* Fix  "internal error: converting '1f' to integer failed - not an integer" with width in printf format string

* Format
2023-05-18 23:26:56 +02:00
chrchr-github 518b6a27ab
Fix Handle lambdas in global scope ()
* Fix  Handle lambdas in global scope

* Capture list
2023-05-17 14:37:56 +02:00
chrchr-github 1999bc68bf
Set values when assigning init list ()
* Assign values to pointers with C++11 init

* Handle assigning empty init list

* Fix  FN uninitdata with value initialization

* Fix test

* Set values when assigning init list
2023-05-14 17:01:07 +02:00
Daniel Marjamäki d475591665
Tokenizer: simplification of typedefs in _Generic arguments () 2023-05-14 15:14:52 +02:00
Daniel Marjamäki 793d6aef01
Tokenizer: do not report unknownMacro for alignas () 2023-05-14 15:14:41 +02:00
chrchr-github cf4d59a835
Partial fix for False positives with function pointers ()
* Partial fix for  False positives with function pointers

* Add test for 
2023-05-14 12:16:17 +02:00
chrchr-github 096d3a78b0
Fix FN uninitdata with value initialization ()
* Assign values to pointers with C++11 init

* Handle assigning empty init list

* Fix  FN uninitdata with value initialization

* Fix test
2023-05-13 22:07:09 +02:00
chrchr-github 6a8c70c1b9
Fix false negative: autoVariables [inconclusive] (regression) ()
* Fix  false negative: autoVariables [inconclusive] (regression)

* Use link()

* Use linkAt()

* Skip over [][]
2023-05-13 14:11:01 +02:00
chrchr-github dc7550ed9f
Assign values to pointers with C++11 init ()
* Assign values to pointers with C++11 init

* Handle assigning empty init list
2023-05-13 14:09:47 +02:00
Daniel Marjamäki 2b74a2084e
Fixed (simplifyTypedef: function with const should be handled better) () 2023-05-12 20:39:08 +02:00
Jedrzej Klocek aa6df06f43
Don't ignore build*, accidently it ignored all files starts with buil… () 2023-05-12 16:08:58 +02:00
Stefan Hagen 2abd9dcf79
nit: removed stray semicolon in checkother.cpp ()
This fixed nit removes a compiler warning.
2023-05-12 11:27:21 +02:00
chrchr-github 2a0143c8e1
Fix Bad ValueFlow depending on initialization () 2023-05-12 07:19:44 +02:00
chrchr-github 59b955e014
Suppress deprecation warning with -E () 2023-05-11 14:35:56 +02:00
chrchr-github f5b1537ed1
Fix internalASTError with decltype() () 2023-05-11 14:35:23 +02:00
Daniel Marjamäki e1d5d9988d
Fixed (Add --showtime=file-total option to show checking time of each file) () 2023-05-11 14:04:22 +02:00
Daniel Marjamäki d5951fa2b9
Tokenizer: Add attribute for exported symbols () 2023-05-09 20:15:00 +02:00
Daniel Marjamäki d24a1342a6
Fixed (Tokenizer: varId not set properly in function call) () 2023-05-08 12:11:30 +02:00
Daniel Marjamäki e8233ceb67 runformat 2023-05-08 10:30:20 +02:00
Daniel Marjamäki 2cb4c4126a
Fix (FP: misra-c2012-5.7 on anonymous struct) () 2023-05-07 20:22:26 +02:00
Daniel Marjamäki 2bf2b7fb44 AUTHORS: Add healytpk 2023-05-07 18:42:57 +02:00
Daniel Marjamäki 527b6fbb45 Revert "ValueFlow: Set max iterations to 2 in normal analysis ()"
This reverts commit 02a3d03a05.
2023-05-07 18:28:01 +02:00
Paul Fultz II 02a3d03a05
ValueFlow: Set max iterations to 2 in normal analysis () 2023-05-07 11:03:27 +02:00
Mo bd8a6f0681
keep SETTINGS_LAST_CHECK_PATH on no selected files ()
set SETTINGS_LAST_CHECK_PATH only when mCurrentDirectory is not empty.
2023-05-07 08:33:47 +02:00
T. P. K. Healy 6c39d087b2
header file path required for picojson () 2023-05-07 08:29:38 +02:00
chrchr-github 580eb8eb83
Remove dead URL () 2023-05-06 08:14:43 +02:00
Daniel Marjamäki 4cf9a704b4
Fixed (False positive: misra 9.3 partial array initializations) () 2023-05-05 17:22:58 +02:00
Paul Fultz II 543b4adc8a
Fix 11682: False positive: constParameterReference with overloaded method ()
* Fix 11682: False positive: constParameterReference with overloaded method

* Format
2023-05-05 11:27:15 +02:00
chrchr-github 1db510b9fd
Add test for () 2023-05-04 22:23:36 +02:00
chrchr-github a31c996a70
Add tests for , () 2023-05-04 20:35:56 +02:00
Oliver Stöneberg a77ab9759c
Suppressions: some cleanups ()
* Suppressions: merged `isSuppressedLocal()` into `isSuppressed()`

* avoid some unnecessary copies when adding suppressions

* TestSuppressions: improved readability of multiple line string literals

* supressions.h: got rid of unnecessary copy and assignment operators for `Suppressions::Suppression` - fixes `performance-move-const-arg` clang-tidy warning

* TestSuppressions: cleaned up a variable construction
2023-05-04 18:15:18 +02:00
chrchr-github d3bdb84650
Fix performance regression (hang) in 2.11dev () 2023-05-04 11:59:03 +02:00
chrchr-github 100d17df4f
Fix FN constParameterPointer with std::vector () 2023-05-04 11:10:58 +02:00
Oliver Stöneberg e6ae312a0b
moved more code into `HAVE_RULES` ()
* moved more code into `HAVE_RULES`

* properly enable all internal and rules code in selfcheck

* updated TODOs in selfcheck

* testrunner.vcxproj.filters: updated

* added missing `Debug-PCRE` and `Release-PCRE` configurations for `testrunner` Visual Studio project

* cppcheck.cpp: fixed `useStlAlgorithm` selfcheck warning
2023-05-04 10:54:19 +02:00
Oliver Stöneberg 5833fc3c19
testrunner: even more `SettingsBuilder` usage and `const` cleanups ()
* moved some of the test-only `Library::loadxmldata()` calls into `test`

* testrunner: reduced need for backup/restore of settings
2023-05-04 10:31:05 +02:00