[PATCH] D128697: [clang-tidy] Add new check `bugprone-unhandled-exception-at-sto`
Eugene Zelenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 28 06:30:20 PDT 2022
Eugene.Zelenko added a comment.
I think will be good idea to make check more generic and allow user-defined list of unsafe functions.
================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:135
+- New :doc:`bugprone-unhandled-exception-at-sto
+ <clang-tidy/checks/bugprone/unhandled-exception-at-sto>` check.
----------------
Please keep entries in alphabetical order in section.
================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:138
+
+ Finds calls to ``stoi`` and ``stod`` families of functions with missing exception handler for ``std::invalid_argument`` and ``std::out_of_range``.
+
----------------
Please follow 80 characters limit.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/unhandled-exception-at-sto.rst:6
+
+Finds calls to ``stoi`` and ``stof`` families of functions with missing exception handler for ``std::invalid_argument`` and ``std::out_of_range``.
+
----------------
Ditto.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/unhandled-exception-at-sto.rst:15
+
+Calls to ``stoi`` and ``stof`` families of functions can throw exceptions of type ``std::invalid_argument`` and ``std::out_of_range`` that should be handled by the code.
----------------
Ditto.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128697/new/
https://reviews.llvm.org/D128697
More information about the cfe-commits
mailing list