Lines Matching full:owner

38 /// Match common cases, where the owner semantic is relevant, like function
41 const auto OwnerDecl = typeAliasTemplateDecl(hasName("::gsl::owner")); in registerMatchers()
50 // updated to use `gsl::owner<>`, like standard C memory management. in registerMatchers()
59 // owner. Best example is `::free()`. in registerMatchers()
81 // with the 'owner<>' annotation and therefore always implicitly cast to the in registerMatchers()
84 // Furthermore, legacy owner functions are assumed to use raw pointers for in registerMatchers()
86 // functions shall be 'gsl::owner<>'. in registerMatchers()
95 // Matching assignment to owners, with the rhs not being an owner nor creating in registerMatchers()
128 // Matching on assignment operations where the RHS is a newly created owner, in registerMatchers()
129 // but the LHS is not an owner. in registerMatchers()
137 // created owner, but the LHS is not an owner. in registerMatchers()
152 // Matching for function calls where one argument is a created owner, but the in registerMatchers()
153 // parameter type is not an owner. in registerMatchers()
165 // Matching on functions, that return an owner/resource, but don't declare in registerMatchers()
166 // their return type as owner. in registerMatchers()
185 // Matching on lambdas, that return an owner/resource, but don't declare in registerMatchers()
186 // their return type as owner. in registerMatchers()
207 // Match on classes that have an owner as member, but don't declare a in registerMatchers()
208 // destructor to properly release the owner. in registerMatchers()
245 "not marked 'gsl::owner<>'; consider using a " in handleDeletion()
265 // as a pointer, which should not be an owner. The argument that is an owner in handleLegacyConsumers()
269 "calling legacy resource function without passing a 'gsl::owner<>'") in handleLegacyConsumers()
280 // Expected function argument to be owner. in handleExpectedOwner()
283 "expected argument of type 'gsl::owner<>'; got %0") in handleExpectedOwner()
290 /// Assignment and initialization of owner variables.
302 "expected assignment source to be of type 'gsl::owner<>'; got %0") in handleAssignmentAndInit()
311 "expected initialization with value of type 'gsl::owner<>'; got %0") in handleAssignmentAndInit()
320 "expected initialization of owner member variable with value of type " in handleAssignmentAndInit()
321 "'gsl::owner<>'; got %0") in handleAssignmentAndInit()
332 /// newly created owner.
344 // Bad assignments to non-owners, where the RHS is a newly created owner. in handleAssignmentFromNewOwner()
347 "assigning newly created 'gsl::owner<>' to non-owner %0") in handleAssignmentFromNewOwner()
353 // Bad initialization of non-owners, where the RHS is a newly created owner. in handleAssignmentFromNewOwner()
356 "initializing non-owner %0 with a newly created 'gsl::owner<>'") in handleAssignmentFromNewOwner()
361 // as 'gsl::owner<OriginalType>' in handleAssignmentFromNewOwner()
365 // Function call, where one arguments is a newly created owner, but the in handleAssignmentFromNewOwner()
370 diag(BadOwnerArgument->getBeginLoc(), "initializing non-owner argument of " in handleAssignmentFromNewOwner()
372 "'gsl::owner<>'") in handleAssignmentFromNewOwner()
381 // declaration does not declare its return value as owner. in handleReturnValues()
388 // owner<> and the function return type is not owner<>. in handleReturnValues()
391 "type %0 or 'gsl::owner<>' from a " in handleReturnValues()
392 "%select{function|lambda}1 whose return type is not 'gsl::owner<>'") in handleReturnValues()
396 // FIXME: Rewrite the return type as 'gsl::owner<OriginalType>' in handleReturnValues()
412 "match on class with bad destructor but without a declared owner"); in handleOwnerMembers()
415 "member variable of type 'gsl::owner<>' requires the class %0 to " in handleOwnerMembers()