1"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[1216],{9580(e,s,n){n.r(s),n.d(s,{assets:()=>o,contentTitle:()=>r,default:()=>h,frontMatter:()=>t,metadata:()=>i,toc:()=>a});const i=JSON.parse('{"id":"checker-self-in-block","title":"Self in Block","description":"An Objective-C-specific analysis to detect when a block captures `self`.","source":"@site/versioned_docs/version-1.3.0/checker-self-in-block.md","sourceDirName":".","slug":"/checker-self-in-block","permalink":"/docs/checker-self-in-block","draft":false,"unlisted":false,"tags":[],"version":"1.3.0","frontMatter":{"title":"Self in Block","description":"An Objective-C-specific analysis to detect when a block captures `self`."},"sidebar":"docs","previous":{"title":"Scope Leakage","permalink":"/docs/checker-scope-leakage"},"next":{"title":"Starvation","permalink":"/docs/checker-starvation"}}');var l=n(4848),c=n(8453);const t={title:"Self in Block",description:"An Objective-C-specific analysis to detect when a block captures `self`."},r=void 0,o={},a=[{value:"List of Issue Types",id:"list-of-issue-types",level:2}];function d(e){const s={a:"a",code:"code",h2:"h2",li:"li",p:"p",ul:"ul",...(0,c.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(s.p,{children:["An Objective-C-specific analysis to detect when a block captures ",(0,l.jsx)(s.code,{children:"self"}),"."]}),"\n",(0,l.jsxs)(s.p,{children:["Activate with ",(0,l.jsx)(s.code,{children:"--self-in-block"}),"."]}),"\n",(0,l.jsx)(s.p,{children:"Supported languages:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:"C/C++/ObjC: Yes"}),"\n",(0,l.jsx)(s.li,{children:"C#/.Net: No"}),"\n",(0,l.jsx)(s.li,{children:"Erlang: No"}),"\n",(0,l.jsx)(s.li,{children:"Hack: No"}),"\n",(0,l.jsx)(s.li,{children:"Java: No"}),"\n",(0,l.jsx)(s.li,{children:"Python: No"}),"\n",(0,l.jsx)(s.li,{children:"Rust: No"}),"\n",(0,l.jsx)(s.li,{children:"Swift: No"}),"\n"]}),"\n",(0,l.jsx)(s.h2,{id:"list-of-issue-types",children:"List of Issue Types"}),"\n",(0,l.jsx)(s.p,{children:"The following issue types are reported by this checker:"}),"\n",(0,l.jsxs)(s.ul,{children:["\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.a,{href:"/docs/all-issue-types#captured_strong_self",children:"CAPTURED_STRONG_SELF"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.a,{href:"/docs/all-issue-types#cxx_ref_captured_in_block",children:"CXX_REF_CAPTURED_IN_BLOCK"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.a,{href:"/docs/all-issue-types#cxx_string_captured_in_block",children:"CXX_STRING_CAPTURED_IN_BLOCK"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.a,{href:"/docs/all-issue-types#mixed_self_weakself",children:"MIXED_SELF_WEAKSELF"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.a,{href:"/docs/all-issue-types#multiple_weakself",children:"MULTIPLE_WEAKSELF"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.a,{href:"/docs/all-issue-types#nsstring_internal_ptr_captured_in_block",children:"NSSTRING_INTERNAL_PTR_CAPTURED_IN_BLOCK"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.a,{href:"/docs/all-issue-types#self_in_block_passed_to_init",children:"SELF_IN_BLOCK_PASSED_TO_INIT"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.a,{href:"/docs/all-issue-types#strong_self_not_checked",children:"STRONG_SELF_NOT_CHECKED"})}),"\n",(0,l.jsx)(s.li,{children:(0,l.jsx)(s.a,{href:"/docs/all-issue-types#weak_self_in_no_escape_block",children:"WEAK_SELF_IN_NO_ESCAPE_BLOCK"})}),"\n"]})]})}function h(e={}){const{wrapper:s}={...(0,c.R)(),...e.components};return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(d,{...e})}):d(e)}},8453(e,s,n){n.d(s,{R:()=>t,x:()=>r});var i=n(6540);const l={},c=i.createContext(l);function t(e){const s=i.useContext(c);return i.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:t(e.components),i.createElement(c.Provider,{value:s},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.