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

Rewrite alias declarations from typedef to using #1747

Open
2 of 3 tasks
bernhardmgruber opened this issue May 16, 2024 · 1 comment
Open
2 of 3 tasks

Rewrite alias declarations from typedef to using #1747

bernhardmgruber opened this issue May 16, 2024 · 1 comment
Assignees

Comments

@bernhardmgruber
Copy link
Contributor

bernhardmgruber commented May 16, 2024

I got so used to alias declarations by now my parser hickups when encountering a typedef these days. Given the general better readability of the former, let's run the clang-tidy refactor on CCCL to rewrite the typedefs to using declarations.

  • Thrust
  • CUB
  • libcu++

Originally posted by @bernhardmgruber in #1721 (comment)

@bernhardmgruber bernhardmgruber self-assigned this May 16, 2024
bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue Jun 19, 2024
Using:
* clang-tidy modernize-use-using
* regex replace: "typedef ([\w<>,:\s*&+:\[\]\.]+)\s+([\w_]+);" by "using $2 = $1;"
* manual search and edits

Fixes: NVIDIA#1747
bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue Jun 19, 2024
Using:
* clang-tidy modernize-use-using
* regex replace: "typedef ([\w<>,:\s*&+:\[\]\.]+)\s+([\w_]+);" by "using $2 = $1;"
* manual search and edits

Fixes a part of: NVIDIA#1747
bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue Jun 19, 2024
Using:
* clang-tidy modernize-use-using
* regex replace: "typedef ([\w<>,:\s*&+:\[\]\.]+)\s+([\w_]+);" by "using $2 = $1;"
* manual search and edits

Fixes a part of: NVIDIA#1747
bernhardmgruber added a commit that referenced this issue Jun 24, 2024
Using:
* clang-tidy modernize-use-using
* regex replace: "typedef ([\w<>,:\s*&+:\[\]\.]+)\s+([\w_]+);" by "using $2 = $1;"
* manual search and edits

Fixes a part of: #1747
bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue Jun 24, 2024
Using:
* clang-tidy modernize-use-using
* regex replace: "typedef ([\w<>,:\s*&+:\[\]\.]+)\s+([\w_]+);" by "using $2 = $1;"
* manual search and edits

Fixes: NVIDIA#1747
bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue Jun 24, 2024
Using:
* clang-tidy modernize-use-using
* regex replace: "typedef ([\w<>,:\s*&+:\[\]\.]+)\s+([\w_]+);" by "using $2 = $1;"
* manual search and edits

Fixes: NVIDIA#1747
bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue Jun 24, 2024
Using:
* clang-tidy modernize-use-using
* regex replace: "typedef ([\w<>,:\s*&+:\[\]\.]+)\s+([\w_]+);" by "using $2 = $1;"
* manual search and edits

Fixes a part of: NVIDIA#1747
bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue Jul 1, 2024
Using:
* clang-tidy modernize-use-using
* regex replace: "typedef ([\w<>,:\s*&+:\[\]\.]+)\s+([\w_]+);" by "using $2 = $1;"
* manual search and edits

Fixes a part of: NVIDIA#1747
bernhardmgruber added a commit that referenced this issue Jul 1, 2024
Using:
* clang-tidy modernize-use-using
* regex replace: "typedef ([\w<>,:\s*&+:\[\]\.]+)\s+([\w_]+);" by "using $2 = $1;"
* manual search and edits

Fixes a part of: #1747
bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue Jul 1, 2024
Using:
* clang-tidy modernize-use-using
* regex replace: "typedef ([\w<>,:\s*&+:\[\]\.]+)\s+([\w_]+);" by "using $2 = $1;"
* manual search and edits

Fixes: NVIDIA#1747
bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue Jul 1, 2024
Using:
* clang-tidy modernize-use-using
* regex replace: "typedef ([\w<>,:\s*&+:\[\]\.]+)\s+([\w_]+);" by "using $2 = $1;"
* manual search and edits

Fixes: NVIDIA#1747
bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue Jul 17, 2024
Using:
* clang-tidy modernize-use-using
* regex replace: "typedef ([\w<>,:\s*&+:\[\]\.]+)\s+([\w_]+);" by "using $2 = $1;"
* manual search and edits

Fixes: NVIDIA#1747
bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue Jul 17, 2024
Using:
* clang-tidy modernize-use-using
* regex replace: "typedef ([\w<>,:\s*&+:\[\]\.]+)\s+([\w_]+);" by "using $2 = $1;"
* manual search and edits

Fixes: NVIDIA#1747
@bernhardmgruber
Copy link
Contributor Author

I have a branch with the changes for libcu++ as well: https://github.com/bernhardmgruber/cccl/tree/using_all. However, it touches a lot of files, especially tests. I wonder whether it could complicate merging changes from libc++. @miscco what do you think? Should we only apply a subset?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

1 participant