[clang-tools-extra] [clang-tidy] Add option 'IgnoredTypes' to bugprone-throwing-static-initialization (PR #192031)
Balázs Kéri via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 14 07:37:51 PDT 2026
================
@@ -6,6 +6,19 @@ bugprone-throwing-static-initialization
Finds all ``static`` or ``thread_local`` variable declarations where the
initializer for the object may throw an exception.
+Options
+-------
+
+.. option:: IgnoredTypes
+
+This option makes it possible to ignore specific types used at variable
+declarations. It may contain a semicolon-separated list of regular expressions.
+Declarations with a type that is matched by this list are excluded from
+producing warnings by the check. The entries of the list are matched as
+substrings of the type name.
+
+This option contains by default an empty string.
----------------
balazske wrote:
An issue with this text can be that it is not obvious that the type name is a substring, if `String` is specified it will match anything which contains `String` like `String1`, `ShortString` ("`^String$`" should match only `String`).
https://github.com/llvm/llvm-project/pull/192031
More information about the cfe-commits
mailing list