Commit Graph

603 Commits

Author SHA1 Message Date
chrchr-github 1d677c57a8
Fix #11126 FN: noExplicitConstructor with single default parameter (#4174) 2022-06-07 21:15:13 +02:00
chrchr-github e7e8b1baf9
Fix #9861 FN: "static" not suggested for non-const method (#4101)
* Fix #9861 FN: "static" not suggested for non-const method

* Format

* Make functions static

* static
2022-05-11 20:01:22 +02:00
chrchr-github 8ce0faf723
Fix #10427 Regression: selfInitialization (#4070) 2022-05-02 16:49:13 +02:00
chrchr-github f323e8a6c6
Fix #10311 FP functionConst (#4012)
* Fix #10311 FP functionConst

* Format

* Format
2022-04-13 12:25:36 +02:00
chrchr-github 00badff622
Fix #10315 FP functionConst (#3997)
* Fix #10315 FP functionConst

* Update releasenotes.txt
2022-04-11 22:55:16 +02:00
chrchr-github f5313dc519
Fix crash with defaulted destructor (#3975) 2022-04-05 23:18:08 +02:00
chrchr-github a9f29fbc09
Fix #10307 FP functionStatic with class template and east-const / #10471 FP constParameter with std::array and east-const (#3963) 2022-04-01 23:26:44 +02:00
chrchr-github 81bcbfa7fe
Fix #10920 FP missingOverride with friend (#3955) 2022-03-28 22:44:04 +02:00
orbitcowboy 8d7fe702e0 Ticket #9104 - Adde a regression test 2022-03-25 17:01:57 +01:00
chrchr-github 2baf8f6cd4
Fix FP virtualCallInConstructor with function pointer (#3913) 2022-03-19 20:00:06 +01:00
chrchr-github fb1170b10b
Fix #10872 FP constStatement with variable called std (#3906) 2022-03-16 15:29:34 +01:00
chrchr-github ffd9f9a93f
Fix FP missingOverride with unnamed parameters (#3887) 2022-03-11 21:44:13 +01:00
chrchr-github 6a8bd981b5
Fix #10825 CheckClass::isMemberVar found used member variable with varid 0 (#3863)
* Fix #10825 CheckClass::isMemberVar found used member variable with varid 0

* Restore call to simpleMatch()
2022-02-28 18:28:23 +01:00
chrchr-github 05a6d09c5f
Fix #10360 FP uninitMemberVar from copy constructor [inconclusive] (#3748) 2022-02-27 19:15:19 +01:00
chrchr-github 5574e41b86
Fix #10065 CheckClass::isMemberVar found used member variable with varid 0 (#3843) 2022-02-20 18:17:47 +01:00
chrchr-github 907218254e
#8126 Fix previous commit (#3833)
* Fix #8126 unsafeClassCanLeak missing for array of pointers

* #8126 Fix previous commit

* Format

* Format
2022-02-15 20:03:02 +01:00
chrchr-github edc5106237
Fix #9092 FN missingOverride - subclass in namespace (#3793) 2022-02-12 08:19:07 +01:00
Rikard Falkeborn d4cd249c21
10671 fix const iterator function const take two (#3802)
* Revert "Revert "Fix #10671: functionConst FN with begin/end and const_iterator (#3749)""

This reverts commit 9f6a36c1a8.

* Fix crash by adding missing null check
2022-02-11 21:23:23 +01:00
Oliver Stöneberg f32583e097
removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
Daniel Marjamäki 3989408738 Update copyright year 2022-02-05 11:45:17 +01:00
Daniel Marjamäki 9f6a36c1a8 Revert "Fix #10671: functionConst FN with begin/end and const_iterator (#3749)"
This reverts commit 2cacb13f85.
2022-02-03 11:04:02 +01:00
chrchr-github 511520d623
Fix #10679 FP constParameter with const/nonconst overload (#3780) 2022-02-02 19:38:32 +01:00
Rikard Falkeborn 2cacb13f85
Fix #10671: functionConst FN with begin/end and const_iterator (#3749)
Check if the iterator is assigned to a const_iterator or
const_revese_iterator, in which case it is possible the function can be
const. Unfortunately, it is not possible to remove the hard coding of
cbegin, cend, crbegin and crend due to the need to handle auto, as in
the following code snippet:

    void cbegin_auto(void)
    {
        for (auto it = m_str.cbegin(); it != m_str.cend(); ++it) {;}
    }
2022-02-02 19:37:06 +01:00
Oliver Stöneberg 171da2e6f9
avoid dependency on transitive includes - based on include-what-you-use (#3757) 2022-01-27 19:03:20 +01:00
chrchr-github d64dadcd31
Fix #10758 Crash in CheckClass::checkConstFunc() (#3740) 2022-01-24 21:50:01 +01:00
chrchr-github b23ca879ed
Fix #10735 FP functionConst with overloaded operator[] [inconclusive] (#3733) 2022-01-21 20:40:10 +01:00
chrchr-github 1e2863cd33
Fix #10520 FP functionConst with aggregate initialization [inconclusive] (#3720) 2022-01-18 20:49:35 +01:00
chrchr-github ca2e0ca287
Fix FP functionConst with extra parentheses (#3722) 2022-01-18 20:21:25 +01:00
chrchr-github c2fc4973ad
Fix #10515 False positive for explicit one-argument constructor if co… (#3718) 2022-01-17 20:51:23 +01:00
chrchr-github 605fd7cf98
Fix #10146 FP functionConst (inconclusive) with nested members (#3719) 2022-01-17 20:33:32 +01:00
chrchr-github 781a145680
Fix regression: functionStatic related to overload resolution (#3705) 2022-01-14 17:55:50 +01:00
chrchr-github ca311ebcdf
ASSERT() on calls to Tokenizer::tokenize() in test code (#3501) 2021-11-29 07:34:39 +01:00
nomick 5865b05703
fix false positive of virtual function call (#3553) 2021-11-11 07:53:30 +01:00
Paul Fultz II 7f358b2bed
Format with uncrustify (#3388) 2021-08-07 20:51:18 +02:00
Daniel Marjamäki f361106770 fix string literals in test code 2021-08-07 15:51:04 +02:00
Daniel Marjamäki d9dacc97e4 virtual call in constructor; warn when function is explicitly virtual 2021-07-11 11:03:31 +02:00
orbitcowboy 260eb4acac Running astyle [ci skip] 2021-04-09 08:46:47 +02:00
ericmalenfant 1e9687aa8b
Fix noCopyConstructor with multiple inheritance (#3203) 2021-04-09 07:41:59 +02:00
Daniel Marjamäki a21c81365d one definition rule: Fixed false positive for 'class A::B ..' 2021-04-04 21:29:45 +02:00
Oliver Stöneberg 6397e29f84
cleaned up includes based on include-what-you-use (#3141) 2021-04-03 21:30:50 +02:00
Daniel Marjamäki 42437277dc Update Copyright year 2021-03-21 20:58:32 +01:00
IOBYTE 1874b9cb0f
fix crash in CheckClass::getFileInfo (#3172)
* fix crash in CheckClass::getFileInfo

* fix another crash

* fix memory leak

Co-authored-by: Robert Reif <reif@FX6840>
2021-03-19 09:19:48 +01:00
PKEuS 141d2ac215 Refactorization: Improved internal implementation of severity and certainty levels
Backported from LCppC.
2021-02-24 22:00:06 +01:00
PKEuS cf1937294a Refactorization: Removed unnecessary \n and spaces in strings
Merged from LCppC.
2021-02-20 12:58:42 +01:00
IOBYTE 8547ff8cc2
fix some hangs in daca from uninstantiated template classes derived f… (#3133)
* fix some hangs in daca from uninstantiated template classes derived from itself

* remove assertions

* fix another simplifyUsing hang

Co-authored-by: Robert Reif <reif@FX6840>
2021-02-17 18:12:49 +01:00
Daniel Marjamäki ef726aaece New check: Detect one definition rule violations 2021-02-09 21:35:08 +01:00
IOBYTE da3eb2e411
fix #10169 (CheckClass::checkDuplInheritedMembersRecursive) (#3114)
Co-authored-by: Robert Reif <reif@FX6840>
2021-02-05 11:05:07 +01:00
Daniel Marjamäki 0338e99f84 CheckClass: Refactoring 2021-02-03 19:25:28 +01:00
Daniel Marjamäki c0731703af astyle formatting
[ci skip]
2021-02-02 15:01:28 +01:00
alonlib12 a22e476162
Fix CheckClass::operatorEqToSelf (#3088) 2021-02-02 15:00:46 +01:00