Commit Graph

13917 Commits

Author SHA1 Message Date
Daniel Marjamäki a400c94230 Update Copyrights 2022-08-28 14:22:12 +02:00
Daniel Marjamäki 5e0fc24bb7 Fixed #11232 (Syntax Error: AST broken, binary operator '!=' doesn't have two operands) 2022-08-27 18:02:19 +02:00
chrchr-github 7156afe003
Fix #5140 FN (error) buffer access out of bounds - known argument (#4402)
* Fix #5140 FN (error) buffer access out of bounds - known argument const char* argv[]

* Format
2022-08-26 17:27:54 +02:00
chrchr-github 917496a844
Fix #5678 FN destructor with no definition hide mismatching alloc/dealloc (#4401)
* Fix #5678 FN destructor with no definition hide mismatching allocation / deallocation

* Format

* Fix test

* Format
2022-08-25 22:52:51 +02:00
chrchr-github 456c6b410e
Fix #2304 FN known strcpy parameter (#4396)
* Fix #2304 FN known strcpy parameter

* Parentheses

* Format
2022-08-24 21:23:45 +02:00
Oliver Stöneberg 467648bec6
fixed #11249 (potential hang with -j and --showtime= when using threads) - synchronized access to `TimerResults::mResults` / added TSAN to CI (#4355) 2022-08-23 20:30:45 +02:00
chrchr-github 13e8d5220c
Fix another c_strParam regression (#4394) 2022-08-23 20:26:36 +02:00
Daniel Marjamäki a2454ecbca cli import cppcheck project with premium options 2022-08-23 20:13:03 +02:00
chrchr-github 4be7f689d7
Fix c_strParam regression (#4393)
* Fix #7515 New check: Not needed c_str() operation

* Comment

* Detect more instances of c_str() misuse

* Fix bad merge

* Check for data() also

* Fix

* Format

* Format

* Fix c_strParam regression
2022-08-23 15:00:27 +02:00
Daniel Marjamäki 5d267000e2 GUI: configuration of premium features 2022-08-22 21:11:28 +02:00
chrchr-github 66fca7ba91
Detect more instances of c_str() misuse (#4392)
* Fix #7515 New check: Not needed c_str() operation

* Comment

* Detect more instances of c_str() misuse

* Fix bad merge

* Check for data() also

* Fix

* Format

* Format
2022-08-22 14:06:10 +02:00
Oliver Stöneberg 9b4973d711
astutils.cpp: some small optimizations (#4378) 2022-08-21 17:39:21 +02:00
Daniel Marjamäki c820d2ba97 refactoring 2022-08-21 17:33:43 +02:00
PKEuS d81a758850
LCppC backports: Refactorizations/Optimizations (#4204) 2022-08-21 17:21:02 +02:00
Oliver Stöneberg 0e1cd8b2ac
do not do C++ processing for C code in `parsedecl()` (#4304) 2022-08-21 17:11:22 +02:00
Oliver Stöneberg 670b872f30
implemented move constructor for `TemplateSimplifier::TokenAndName` (#4390) 2022-08-21 17:02:03 +02:00
chrchr-github d351a97a0f
Fix #8336 FN stlcstrParam (#4389)
* Fix #7515 New check: Not needed c_str() operation

* Comment

* Fix error messages

* Handle more complex string expressions

* Fix #8336 FN stlcstrParam

* Handle iterators

* Format

* Format

* Parentheses
2022-08-21 13:04:43 +02:00
Oliver Stöneberg 1202efb438
some `--exception-handling` related improvements (#4368) 2022-08-20 20:54:31 +02:00
chrchr-github b04bf7396f
Fix #7515 New check: Not needed c_str() operation (#4371) 2022-08-20 20:52:10 +02:00
Oliver Stöneberg d73a33d17e
avoid redundant `Token::declEndToken()` calls (#4363) 2022-08-20 20:50:14 +02:00
Oliver Stöneberg 2afd5f80e7
smallvector.h: bake `reserve()` into the non-boost `SmallVector` implementation (#4385) 2022-08-20 20:44:26 +02:00
Oliver Stöneberg 1d95d1908d
refs #10663 - sped up `Library::detectContainerOrIterator()` by iterating the containers only once (#4380) 2022-08-20 12:14:55 +02:00
chrchr-github 2ab8de2650
Fix #11145 FP negativeMemoryAllocationSize with possible value (#4387) 2022-08-20 07:56:31 +02:00
Oliver Stöneberg f138df2909
mathlib.h: replaced slow `std::ostringstream` with `std::to_string()` in `MathLib::toString()` (#4382) 2022-08-19 20:44:24 +02:00
chrchr-github 80a486dda0
Fix #11167 FP virtual call in destructor even though class is final / Delete 'final' from specializations (#4383)
* Add 'final' keyword

* Delete 'final' from specializations

* Fix #11167 FP virtual call in destructor even though class is final

* Fix test
2022-08-19 18:26:00 +02:00
Oliver Stöneberg 16f598c409
added missing `sstream` includes (#4381) 2022-08-19 10:16:23 +02:00
chrchr-github 1aa259569e
Fix #10138 syntax error : int (operator"" _ii)(unsigned long long v) … (#4374)
* Fix #10138 syntax error : int (operator"" _ii)(unsigned long long v) { return v; }

* Format
2022-08-18 23:38:45 +02:00
Oliver Stöneberg e09f5f0db7
refs # 11106 (optimize CheckUnusedVar::checkStructMemberUsage()) - added missing loop breaks (#4376) 2022-08-18 23:36:21 +02:00
chrchr-github 6a0c254d1f
Fix #9931 FP zerodiv (daca@home) (#4379)
* Fix #9931 FP zerodiv (daca@home)

* Format

* Parentheses

* clang-tidy
2022-08-18 20:38:36 +02:00
chrchr-github 4a64e20592
unusedScopedObject: Don't warn for void statements (#4370)
* Fix unusedScopedObject FPs

* Simplify

* Simplify

* Fix test

* Don't warn for void statements

* Format
2022-08-17 19:45:46 +02:00
Oliver Stöneberg 0f0c4061ff
astutils.cpp: avoid redundant callback invocation in `isExpressionChangedAt()` (#4369) 2022-08-17 13:50:39 +02:00
Oliver Stöneberg 5f171b9673
fixed some `modernize-use-emplace` false negatives with `std::stack` / removed `internalStlUsage` check (#4346) 2022-08-17 09:50:14 +02:00
chrchr-github 5b4c6c1e73
Fix #11026 FP pointerOutOfBounds with strlen() (#4366) 2022-08-17 09:45:07 +02:00
chrchr-github 1a95515e47
Fix unusedScopedObject FPs (#4364) 2022-08-17 09:11:23 +02:00
Oliver Stöneberg 98b9f2cbf1
reduced scope of some variables and avoided some copies (#4328) 2022-08-16 22:28:39 +02:00
chrchr-github 3dc2c0bd42
Fix #11257 FN constStatement with misused comma (#4365) 2022-08-16 22:10:58 +02:00
Oliver Stöneberg 31d704e4bc
cppcheckexecutor.cpp: extracted platform-dependent code into separate files (#4359) 2022-08-16 22:03:44 +02:00
Paul Fultz II 72c764b034
Expose exprId to addon (#4354) 2022-08-16 22:00:31 +02:00
Oliver Stöneberg 38c7d0a5f8
config.h: implemented `NORETURN` for GCC < 5 (#4361) 2022-08-16 06:52:54 +02:00
Oliver Stöneberg 4bf5dcd29f
cleaned up includes based on include-what-you-use (#4358)
* cleaned up includes based on include-what-you-use

* testlibrary.cpp: no need for `empyString` optimization
2022-08-14 12:44:19 +02:00
Oliver Stöneberg f7caf7dc93
avoid some unnecessary `std::string()` construction in comparisons (#4357)
* avoid unnecessary string wrapping

* consistently use `strcmp()`
2022-08-14 12:44:09 +02:00
chrchr-github afef71f6b6
Partial fix for #10057 unused variable without assignment not detected (#4348)
* Partial fix for #10057 unused variable without assignment not detected

* Add test for #9672
2022-08-13 08:29:06 +02:00
Oliver Stöneberg c54b3f4de0
removed leftover bughunting GUI related fields from `ErrorMessage` (#4351) 2022-08-13 08:27:52 +02:00
Paul Fultz II bfd9470600
Fix 11158: FP zerodiv in loop (#4356)
* Fix 11158: FP zerodiv in loop

* Format

* Add another test

* Format

* Fix FP

* Format
2022-08-13 08:27:20 +02:00
chrchr-github bdbd84ba98
#11238: Fix regression (#4349)
* Fix #11238 FP knownConditionTrueFalse with constexpr?

* Modify isConstVarExpression()

* Use predicate

* Format

* #11238: Fix regression
2022-08-09 13:13:16 +02:00
chrchr-github 974e34490f
Fix #9282 FP Unused private function (#4327) 2022-08-07 20:06:32 +02:00
Oliver Stöneberg 156323c95e
avoid unnecessary copies with `insert()` (#4323) 2022-08-07 19:31:16 +02:00
chrchr-github 078a6d7804
Fix #11238 FP knownConditionTrueFalse with constexpr? (#4341) 2022-08-07 19:06:19 +02:00
chrchr-github d5a0dfda00
Fix #11239 checkLibraryCheckType with asm goto() (invalid varid), add test for #8666 (#4340)
* Add test for #6541, avoid duplicate warning

* Add test for #5475

* Fix test

* Merge

* Add test for #8666

* Fix #11239 checkLibraryCheckType with asm goto() (invalid varid)

* Format
2022-08-04 21:35:18 +02:00
umanamente 460f63558d
Fixed typo in checkautovariables.cpp: getPointerDepth() (#4329) 2022-08-04 07:52:10 +02:00