================ @@ -418,6 +431,18 @@ static void checkAttrArgsAreCapabilityObjs(Sema &S, Decl *D, } } +static bool checkFunParamsAreScopedLockable(Sema &S, + const ParmVarDecl *ParamDecl, + const ParsedAttr &AL) { + QualType ParamType = ParamDecl->getType(); + if (const auto *RefType = ParamType->getAs<ReferenceType>()) + if (checkRecordTypeForScopedCapability(S, RefType->getPointeeType())) + return true; ---------------- AaronBallman wrote:
```suggestion if (const auto *RefType = ParamType->getAs<ReferenceType>(); RefType && checkRecordTypeForScopedCapability(S, RefType->getPointeeType())) return true; ``` 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