[clang-tools-extra] [clang-tidy][NFC] Apply llvm-redundant-casting check (PR #214024)

Yanzuo Liu via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 4 18:50:12 PDT 2026


================
@@ -80,8 +80,8 @@ void ReturnBracedInitListCheck::check(const MatchFinder::MatchResult &Result) {
   // Make sure that the ctor arguments match the declaration.
   for (unsigned I = 0, NumParams = MatchedConstructExpr->getNumArgs();
        I < NumParams; ++I) {
-    if (const auto *VD = dyn_cast<VarDecl>(
-            MatchedConstructExpr->getConstructor()->getParamDecl(I))) {
+    if (const auto *VD =
----------------
zwuis wrote:

```suggestion
    if (const ParmVarDecl *VD =
```


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


More information about the cfe-commits mailing list