[PATCH] D145865: [clang-tidy] Multiple fixes to bugprone-exception-escape

Piotr Zegar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 12 04:09:57 PDT 2023


PiotrZSL created this revision.
Herald added subscribers: carlosgalvezp, xazax.hun.
Herald added a reviewer: njames93.
Herald added a project: All.
PiotrZSL requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

- Added support for C++17 or later in tests and added new tests
- Pointers to member functions are now handled correctly in C++20
- Move constructors and operators that are explicitly declared with `noexcept(false)` or `throw(XYZ)` are now allowed
- It is now assumed that called noexcept functions won't throw exceptions
- Warnings will now only be printed for function definitions, not declarations
- The throw exception types are now printed as a note

  Fixes:
  - https://github.com/llvm/llvm-project/issues/40583
  - https://github.com/llvm/llvm-project/issues/43667
  - https://github.com/llvm/llvm-project/issues/46282
  - https://github.com/llvm/llvm-project/issues/49151
  - https://github.com/llvm/llvm-project/issues/51596
  - https://github.com/llvm/llvm-project/issues/54668
  - https://github.com/llvm/llvm-project/issues/54956
  - https://github.com/llvm/llvm-project/issues/55143
  - https://github.com/llvm/llvm-project/issues/56411


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145865

Files:
  clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.cpp
  clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/bugprone/exception-escape.rst
  clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape-throw.cpp
  clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145865.504418.patch
Type: text/x-patch
Size: 21367 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230312/9f41b07d/attachment-0001.bin>


More information about the cfe-commits mailing list