-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[clang-tidy] Rename and move 'cert-oop58-cpp' to 'bugprone-copy-constructor-mutates-argument' #164566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
[clang-tidy] Rename and move 'cert-oop58-cpp' to 'bugprone-copy-constructor-mutates-argument' #164566
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4640cf7
Move check cert-oop58-cpp => bugprone-mutating-copy
dvbuka 571e46a
Add mutating-copy rename to release notes and checks list
dvbuka c0786cd
Rename oop8-cpp check to copy-constructor-mutates-argument
dvbuka bc38b0e
Formatting changes
dvbuka cdde076
Update name of test to bugprone-copy-constructor-mutates-argument
dvbuka fe088e0
Add check to header
dvbuka e62c69c
Fix typo in comment
dvbuka a21f963
Typo in new check name
dvbuka c6c63c1
Fix ref to moved check
dvbuka cb95b46
Merge branch 'main' into rename-cert-oop58-cpp
dvbuka 4479a11
Change order of check
dvbuka 93dac3b
Merge branch 'main' into rename-cert-oop58-cpp
vbvictor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...ols-extra/docs/clang-tidy/checks/bugprone/copy-constructor-mutates-argument.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| .. title:: clang-tidy - bugprone-copy-constructor-mutates-argument | ||
|
|
||
| bugprone-copy-constructor-mutates-argument | ||
| ========================================== | ||
|
|
||
| Finds assignments to the copied object and its direct or indirect members | ||
| in copy constructors and copy assignment operators. | ||
|
|
||
| This check corresponds to the CERT C Coding Standard rule | ||
| `OOP58-CPP. Copy operations must not mutate the source object | ||
| <https://wiki.sei.cmu.edu/confluence/display/cplusplus/OOP58-CPP.+Copy+operations+must+not+mutate+the+source+object>`_. |
13 changes: 6 additions & 7 deletions
13
clang-tools-extra/docs/clang-tidy/checks/cert/oop58-cpp.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,10 @@ | ||
| .. title:: clang-tidy - cert-mutating-copy | ||
| .. title:: clang-tidy - cert-oop58-cpp | ||
| .. meta:: | ||
| :http-equiv=refresh: 5;URL=../bugprone/copy-constructor-mutates-argument.html | ||
|
|
||
| cert-oop58-cpp | ||
| ============== | ||
|
|
||
| Finds assignments to the copied object and its direct or indirect members | ||
| in copy constructors and copy assignment operators. | ||
|
|
||
| This check corresponds to the CERT C Coding Standard rule | ||
| `OOP58-CPP. Copy operations must not mutate the source object | ||
| <https://wiki.sei.cmu.edu/confluence/display/cplusplus/OOP58-CPP.+Copy+operations+must+not+mutate+the+source+object>`_. | ||
| The `cert-oop58-cpp` check is an alias, please see | ||
| :doc:`bugprone-copy-constructor-mutates-argument <../bugprone/copy-constructor-mutates-argument>` | ||
| for more information. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...st/clang-tidy/checkers/cert/oop58-cpp.cpp → ...one/copy-constructor-mutates-argument.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.