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

[clang-tidy] add support for move constructor and move assignment operator in modernize-use-equals-default? #122633

Open
flovent opened this issue Jan 12, 2025 · 1 comment
Labels
clang-tidy enhancement Improving things as opposed to bug fixing, e.g. new or missing feature

Comments

@flovent
Copy link
Contributor

flovent commented Jan 12, 2025

According to https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c80-use-default-if-you-have-to-be-explicit-about-using-the-default-semantics, we should not define any of special member functions which has semantics same as =default.

modernize-use-equals-default support all special member functions except move constructor and move assignment operator for now, it's mentioned in it's doc but no specific reason was given in code or commit messages.

modernize-use-equals-default's doc website: https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html

if this support can be added, please let me know and i can pull a request for it.

@llvmbot
Copy link
Member

llvmbot commented Jan 12, 2025

@llvm/issue-subscribers-clang-tidy

Author: None (flovent)

According to https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c80-use-default-if-you-have-to-be-explicit-about-using-the-default-semantics, we should not define any of special member functions which has semantics same as `=default`.

modernize-use-equals-default support all special member functions except move constructor and move assignment operator for now, it's mentioned in it's doc but no specific reason was given in code or commit messages.

modernize-use-equals-default's doc website: https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html

if this support can be added, please let me know and i can pull a request for it.

@flovent flovent changed the title [clang-tidy] add support for move constructor and move assignment operator in modernize-use-equals-default? [clang-tidy] add support for move constructor and move assignment operator in modernize-use-equals-default? Jan 12, 2025
@EugeneZelenko EugeneZelenko added the enhancement Improving things as opposed to bug fixing, e.g. new or missing feature label Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang-tidy enhancement Improving things as opposed to bug fixing, e.g. new or missing feature
Projects
None yet
Development

No branches or pull requests

3 participants