[PATCH] D114602: [clang-tidy][docs][NFC] Improve documentation of bugprone-unhandled-exception-at-new
Balázs Kéri via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 26 07:09:47 PST 2021
balazske marked 5 inline comments as done.
balazske added inline comments.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unhandled-exception-at-new.rst:19-20
The check assumes that any user-defined ``operator new`` is either
``noexcept`` or may throw an exception of type ``std::bad_alloc`` (or derived
from it). Other exception types or exceptions occurring in the object's
constructor are not taken into account.
----------------
whisperity wrote:
> What does
>
> > exception types or exceptions
>
> mean?
Now it is probably better. "Other exception" is any thrown exception of other class than the mentioned ones.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unhandled-exception-at-new.rst:26
+ int *f() noexcept {
+ int *p = new int[1000]; // warning: exception handler is missing
+ // ...
----------------
whisperity wrote:
> Is that the warning message the check prints?
Warning text is changed to the exact checker's message.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114602/new/
https://reviews.llvm.org/D114602
More information about the cfe-commits
mailing list