Skip to content
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

ICU-22793 Clang-Tidy: google-readability-casting #3060

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

roubert
Copy link
Member

@roubert roubert commented Jul 4, 2024

https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/google/readability-casting.html

Checklist
  • Required: Issue filed: https://unicode-org.atlassian.net/browse/ICU-22793
  • Required: The PR title must be prefixed with a JIRA Issue number.
  • Required: The PR description must include the link to the Jira Issue, for example by completing the URL in the first checklist item
  • Required: Each commit message must be prefixed with a JIRA Issue number.
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable

@roubert roubert marked this pull request as draft July 4, 2024 12:26
@roubert roubert marked this pull request as ready for review July 4, 2024 12:56
@roubert roubert requested a review from eggrobin July 4, 2024 12:56
@eggrobin
Copy link
Member

eggrobin commented Jul 4, 2024

Having looked at all of icu4c/source/common, this certainly looks like an improvement, considering the static casts mixed with reinterpret casts that were lurking in various places, and the unnecessary casts.

Only 388 more files to look at…

@eggrobin
Copy link
Member

eggrobin commented Jul 4, 2024

Done with icu4c/source/i18n/, only one comment so far.

Miscellaneous thoughts: turning the infamous Chinese calendar cast-with-comment « cast away const » into a const_cast is certainly a very good thing (though I still think we should get rid of them eventually).
Even more so for turning casts without comments into const_casts in icu4c/source/i18n/dtfmtsym.cpp.

263 more files to look at…

@roubert
Copy link
Member Author

roubert commented Jul 4, 2024

Miscellaneous thoughts: turning the infamous Chinese calendar cast-with-comment « cast away const » into a const_cast is certainly a very good thing (though I still think we should get rid of them eventually).

I've already filed ICU-22640 about all the const_cast<…>(this).

@roubert roubert merged commit 0178a07 into unicode-org:main Jul 4, 2024
98 checks passed
@roubert roubert deleted the 22793-readability branch July 4, 2024 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants