llvm-project/clang-tools-extra/docs
Konrad Kleine e636e6b79a [clang-tidy]: Added modernize-replace-disallow-copy-and-assign-macro
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
2020-06-03 16:56:03 -04:00
..
_static Added more detailed documentation for clangd 2019-02-27 15:53:05 +00:00
_templates [clangd] Redirect documentation to clangd.llvm.org. 2020-03-12 11:45:40 +01:00
clang-tidy [clang-tidy]: Added modernize-replace-disallow-copy-and-assign-macro 2020-06-03 16:56:03 -04:00
clangd [clangd] Add README pointing to docs, bugtracker etc. NFC 2020-03-12 14:00:08 +01:00
CMakeLists.txt docs: Fix Sphinx detection with out-of-tree builds 2017-05-09 11:11:52 +00:00
ModularizeUsage.rst
README.txt Updated the documentation build instructions for the current CMake build system 2019-02-25 13:03:44 +00:00
ReleaseNotes.rst [clang-tidy]: Added modernize-replace-disallow-copy-and-assign-macro 2020-06-03 16:56:03 -04:00
clang-doc.rst doc: Document that extra-arg/extra-arg-before can be used several times 2019-12-24 13:07:08 +01:00
clang-include-fixer.rst [docs] Update path to clang-tools-extra 2020-01-02 19:30:29 +08:00
clang-modernize.rst
clang-rename.rst doc: use the right url to bugzilla 2020-03-22 22:49:40 +01:00
clang-tidy.rst [Documentation] Use HTTPS whenever possible. 2019-01-22 19:19:48 +00:00
clangd.rst [clangd] Redirect documentation to clangd.llvm.org. 2020-03-12 11:45:40 +01:00
conf.py Bump the trunk major version to 11 2020-01-15 13:38:01 +01:00
cpp11-migrate.rst
doxygen-mainpage.dox
doxygen.cfg.in [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
index.rst [clangd] Redirect documentation to clangd.llvm.org. 2020-03-12 11:45:40 +01:00
make.bat
modularize.rst [Documentation] Use HTTPS whenever possible. 2019-01-22 19:19:48 +00:00
pp-trace.rst [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00

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.