Skip to content

Conversation

@npaun
Copy link
Member

@npaun npaun commented Oct 27, 2025

This PR uses clang-tidy to fix two of my pet peeves:

  • Rule google-readability-casting. We do not need a plethora of ways to cast in our codebase. This change gets rid of C-style casts (T)x and function-style casts T(x). It also gets rid of some exotic stuff like using casting syntax to run a constructor (std::string)y. Now we have to use static_cast<T>(x) and reinterpret_cast<T>(x) as appropriate.
  • Rule modernize-use-using. We don't need two different ways to create type aliases. Gets rid of typedef in favour of using.

@npaun npaun requested review from a team as code owners October 27, 2025 19:21
@npaun npaun force-pushed the npaun/clang-tidy-casts branch from daae087 to d775020 Compare October 27, 2025 20:28
@fhanau
Copy link
Contributor

fhanau commented Oct 28, 2025

Certainly on board with using modernize-use-using though. Also see the post I made internally re. coordinating on enabling clang-tidy checks.

@npaun npaun force-pushed the npaun/clang-tidy-casts branch from d775020 to 3ee8898 Compare November 4, 2025 16:55
@npaun npaun enabled auto-merge November 4, 2025 16:55
@npaun npaun merged commit df1cafa into main Nov 4, 2025
31 of 33 checks passed
@npaun npaun deleted the npaun/clang-tidy-casts branch November 4, 2025 18: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.

3 participants