Commit Graph

13893 Commits

Author SHA1 Message Date
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
Paul Fultz II c0f55a2b85
Fix 11142: FP nullPointer before assignment (#4319)
* Fix 11142: FP nullPointer before assignment

* Format

* Use simpleMatch
2022-08-03 19:05:07 +02:00
Paul Fultz II 6cb3a79a64
Fix 11147: FP invalidContainer with substr() (#4333)
* Fix 11147: FP invalidContainer with substr()

* Format
2022-08-03 19:04:44 +02:00
chrchr-github dd927aab9b
Fix #11237 checkLibraryNoReturn with unassigned object (#4338)
* Handle float values

* Fix #11237 checkLibraryNoReturn with unassigned object
2022-08-03 19:04:10 +02:00
chrchr-github a62c3ea90e
Fix #11234 Broken AST with auto**, FP constStatement (#4339) 2022-08-03 19:03:38 +02:00
chrchr-github 0eabe0505b
Handle float values (#4336) 2022-08-02 22:11:31 +02:00
chrchr-github 71f9a7269f
Add test for #6541, #5475, avoid duplicate warning (#4335)
* Add test for #6541, avoid duplicate warning

* Add test for #5475

* Fix test
2022-08-02 21:43:18 +02:00
chrchr-github bc409776e3
Fix #10320 Wrong redundant condition: misleading/wrong message (#4334)
* Fix #10320 Wrong redundant condition: misleading/wrong message

* Use expressionString()

* Clarify condition

* Update testcondition.cpp

* Trigger CI
2022-08-02 18:31:02 +02:00
chrchr-github 92d569afb6
#11233 FP: knownConditionTrueFalse (wrong message text) (#4330)
* #11233 FP: knownConditionTrueFalse (wrong message text)

* Format

* Update testcondition.cpp

* Trigger CI
2022-08-02 18:18:46 +02:00
chrchr-github 38fdbe0890
Fix #9716 Syntax error for function-try-block in global scope (#4305)
* Fix #9716 Syntax error for function-try-block in global scope

* static through instance

* Handle multiple catch blocks

* Add test

* Fix skip logic

* Handle init lists in simplifyFunctionTryCatch()
2022-07-31 14:49:50 +02:00
Oliver Stöneberg efaaa58896
fixed some `modernize-use-emplace` false negatives and some `bugprone-assignment-in-if-condition` warnings (#4311) 2022-07-28 22:53:59 +02:00
Oliver Stöneberg b65b47d3a8
enabled and fixed `modernize-pass-by-value` clang-tidy warnings (#4169) 2022-07-28 22:51:45 +02:00
chrchr-github 304e448749
Fix #8476 --check-library reports missing configuration for static_assert (#4314) 2022-07-28 22:47:15 +02:00
chrchr-github c340b6ae6c
Fix #11191 FP moduloofone with pow() (#4312) 2022-07-28 22:11:23 +02:00
Daniel Marjamäki 898ad314ab badBitmaskCheck: Avoid FP when there is #ifdef in expression 2022-07-28 21:56:05 +02:00
Oliver Stöneberg d6eb3a8f40
some changes for clang/clang-tidy 15 (#4310) 2022-07-26 15:30:53 +02:00
Oliver Stöneberg 887463855b
mitigated most clang-tidy warnings in headers (#4175) 2022-07-26 11:10:03 +02:00
chrchr-github 58d7185d64
Fix #10077 FP functionConst when overloaded operator ++ is used (#4309) 2022-07-26 08:30:59 +02:00
Oliver Stöneberg 0005be1dbf
some cleanups (#4308) 2022-07-26 08:28:55 +02:00
chrchr-github 15f8c71ec3
Fix #9946 FP: unassignedVariable when operator() is called subsequently (#4303) 2022-07-24 17:52:14 +02:00
chrchr-github 479533a80a
Rework fix for #11008 (#4296) 2022-07-24 12:15:04 +02:00
chrchr-github 1aceded300
Fix #10977 FP noExplicitConstructor with variadic template (#4301) 2022-07-24 10:18:19 +02:00
Oliver Stöneberg b2f15fdbb1
reduced padding in some classes/structs (#4295) 2022-07-24 10:17:11 +02:00
Daniel Marjamäki 894975f845 SymbolDatabase: Add Function::access info for methods 2022-07-22 10:37:00 +02:00
chrchr-github 0d72216cca
Fix BufferOverrun TODO (#4300)
* Fix BufferOverrun TODO

* clang-tidy
2022-07-22 07:24:34 +02:00