[clang-tidy] Add more checks for functions which should be noexcept
authorAMS21 <AMS21.github@gmail.com>
Tue, 13 Jun 2023 18:56:54 +0000 (18:56 +0000)
committerPiotr Zegar <me@piotrzegar.pl>
Tue, 13 Jun 2023 18:56:57 +0000 (18:56 +0000)
commit474a2b9367ad36213ad8575dc349350fdd8fc8f3
treee98a278dbaba54a47fcac321391d6b942939553e
parent6eb6ee3cfe57b768d384486693a17c7abaa0f59a
[clang-tidy] Add more checks for functions which should be noexcept

Added new checks
- `performance-noexcept-destructor`
- `performance-noexcept-swap`

Also added cppcoreguidlines aliases for the 2 new checks as well as `performance-noexcept-move-constructor`

This fixes llvm#62154

Reviewed By: PiotrZSL

Differential Revision: https://reviews.llvm.org/D148697
22 files changed:
clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tools-extra/clang-tidy/performance/CMakeLists.txt
clang-tools-extra/clang-tidy/performance/NoexceptDestructorCheck.cpp [new file with mode: 0644]
clang-tools-extra/clang-tidy/performance/NoexceptDestructorCheck.h [new file with mode: 0644]
clang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp
clang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCheck.h
clang-tools-extra/clang-tidy/performance/NoexceptSwapCheck.cpp [new file with mode: 0644]
clang-tools-extra/clang-tidy/performance/NoexceptSwapCheck.h [new file with mode: 0644]
clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp
clang-tools-extra/clang-tidy/utils/ExceptionSpecAnalyzer.cpp
clang-tools-extra/clang-tidy/utils/LexerUtils.cpp
clang-tools-extra/clang-tidy/utils/LexerUtils.h
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/noexcept-destructor.rst [new file with mode: 0644]
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/noexcept-move-operations.rst [new file with mode: 0644]
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/noexcept-swap.rst [new file with mode: 0644]
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/docs/clang-tidy/checks/performance/noexcept-destructor.rst [new file with mode: 0644]
clang-tools-extra/docs/clang-tidy/checks/performance/noexcept-swap.rst [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/performance/noexcept-destructor.cpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/performance/noexcept-move-constructor.cpp
clang-tools-extra/test/clang-tidy/checkers/performance/noexcept-swap.cpp [new file with mode: 0644]