forked from OSchip/llvm-project
e636e6b79a
Summary: This check finds macro expansions of `DISALLOW_COPY_AND_ASSIGN(Type)` and replaces them with a deleted copy constructor and a deleted assignment operator. Before the `delete` keyword was introduced in C++11 it was common practice to declare a copy constructor and an assignment operator as a private members. This effectively makes them unusable to the public API of a class. With the advent of the `delete` keyword in C++11 we can abandon the `private` access of the copy constructor and the assignment operator and delete the methods entirely. Migration example: ``` lang=dif class Foo { private: - DISALLOW_COPY_AND_ASSIGN(Foo); + Foo(const Foo &) = delete; + const Foo &operator=(const Foo &) = delete; }; ``` Reviewers: alexfh, hokein, aaron.ballman, njames93 Reviewed By: njames93 Subscribers: Eugene.Zelenko, mgorny, xazax.hun, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D80531 |
||
---|---|---|
.. | ||
_static | ||
_templates | ||
clang-tidy | ||
clangd | ||
CMakeLists.txt | ||
ModularizeUsage.rst | ||
README.txt | ||
ReleaseNotes.rst | ||
clang-doc.rst | ||
clang-include-fixer.rst | ||
clang-modernize.rst | ||
clang-rename.rst | ||
clang-tidy.rst | ||
clangd.rst | ||
conf.py | ||
cpp11-migrate.rst | ||
doxygen-mainpage.dox | ||
doxygen.cfg.in | ||
index.rst | ||
make.bat | ||
modularize.rst | ||
pp-trace.rst |
README.txt
---------------------------------- Documentation in clang-tools-extra ---------------------------------- To generate documentation in HTML format from files in clang-tools-extra/docs, build the docs-clang-tools-html target. To generate documentation from the source code using Doxygen, build the doxygen-clang-tools target.