[clang-tools-extra] [clang-tidy] Add fine-graded configuration for 'bugprone-exception-escape' (PR #164081)

via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 18 07:30:11 PDT 2025


================
@@ -35,6 +35,31 @@ WARNING! This check may be expensive on large source files.
 Options
 -------
 
+.. option:: CheckDestructors
+
+   When `true`, destructors are analyzed to not throw exceptions.
+   Default value is `true`.
+
+.. option:: CheckMoveMemberFunctions
+
+   When `true`, move constructors and move assignment operators are analyzed
+   to not throw exceptions. Default value is `true`.
+
+.. option:: CheckMain
+
+   When `true`, ``main()`` function is analyzed to not throw exceptions.
+   Default value is `true`.
+
+.. option:: CheckNothrowFunctions
+
+   When `true`, functions marked with ``noexcept`` or ``throw()`` exception
+   specifications are analyzed to not throw exceptions. Default value is `true`.
+
+.. option:: CheckedSwapFunctions
+
+   Comma separated list of swap function names which should not throw exceptions.
----------------
EugeneZelenko wrote:

```suggestion
   Comma-separated list of swap function names which should not throw exceptions.
```

By the word, will be good idea to standardize separator across all checks. Sometimes it's comma, sometimes - semicolon.

https://github.com/llvm/llvm-project/pull/164081


More information about the cfe-commits mailing list