[clang-tidy] New checker performance-trivially-destructible-check
authorAnton Bikineev <bikineev@chromium.org>
Fri, 25 Oct 2019 11:03:53 +0000 (13:03 +0200)
committerAnton Bikineev <bikineev@chromium.org>
Fri, 1 Nov 2019 15:16:49 +0000 (16:16 +0100)
commitd36a0333102698a1398971d0717465322b1c5c2c
tree6ec7ef247186a22ff8660264cdc133a7ea9cc16b
parent7849862f46933306454342b0e8ee05e4e6806646
[clang-tidy] New checker performance-trivially-destructible-check

Checks for types which can be made trivially-destructible by removing
out-of-line defaulted destructor declarations.

The check is motivated by the work on C++ garbage collector in Blink
(rendering engine for Chrome), which strives to minimize destructors and
improve runtime of sweeping phase.

In the entire chromium codebase the check hits over 2000 times.

Differential Revision: https://reviews.llvm.org/D69435
clang-tools-extra/clang-tidy/performance/CMakeLists.txt
clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp
clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.cpp [new file with mode: 0644]
clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.h [new file with mode: 0644]
clang-tools-extra/clang-tidy/utils/Matchers.h
clang-tools-extra/clang-tidy/utils/TypeTraits.cpp
clang-tools-extra/clang-tidy/utils/TypeTraits.h
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/docs/clang-tidy/checks/performance-trivially-destructible.rst [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/performance-trivially-destructible.cpp [new file with mode: 0644]