[clang-tools-extra] [clang-tidy] Add option 'IgnoredTypes' to bugprone-throwing-static-initialization (PR #192031)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 14 03:18:38 PDT 2026


================
@@ -23,7 +37,9 @@ void ThrowingStaticInitializationCheck::registerMatchers(MatchFinder *Finder) {
           varDecl(
               anyOf(hasThreadStorageDuration(), hasStaticStorageDuration()),
               unless(anyOf(isConstexpr(), hasType(cxxRecordDecl(isLambda())),
-                           hasAncestor(functionDecl()))),
+                           hasAncestor(functionDecl()),
+                           hasType(tidy::matchers::matchesAnyListedTypeName(
----------------
vbvictor wrote:

Nit, probably don't need `tidy`
```suggestion
                           hasType(matchers::matchesAnyListedTypeName(
```

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


More information about the cfe-commits mailing list