================
@@ -645,6 +670,10 @@ static void handleLockReturnedAttr(Sema &S, Decl *D, const 
ParsedAttr &AL) {
 }
 
 static void handleLocksExcludedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
+  if (const auto *ParmDecl = dyn_cast<ParmVarDecl>(D))
+    if (!checkFunParamsAreScopedLockable(S, ParmDecl, AL))
+      return;
----------------
AaronBallman wrote:

```suggestion
  if (const auto *ParmDecl = dyn_cast<ParmVarDecl>(D); ParmDecl &&
      !checkFunParamsAreScopedLockable(S, ParmDecl, AL))
    return;
```
Same suggestion applies a few times below as well.

https://github.com/llvm/llvm-project/pull/110523
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to