Lines Matching refs:scope
98 PoolScope &scope = *scpI; in ~AutoreleasePoolRewriter() local
99 clearRefsIn(*scope.Begin, info.Refs); in ~AutoreleasePoolRewriter()
100 clearRefsIn(*scope.End, info.Refs); in ~AutoreleasePoolRewriter()
101 clearRefsIn(scope.Releases.begin(), scope.Releases.end(), info.Refs); in ~AutoreleasePoolRewriter()
122 PoolScope &scope = *scpI; in ~AutoreleasePoolRewriter() local
123 clearUnavailableDiags(*scope.Begin); in ~AutoreleasePoolRewriter()
124 clearUnavailableDiags(*scope.End); in ~AutoreleasePoolRewriter()
125 if (scope.IsFollowedBySimpleReturnStmt) { in ~AutoreleasePoolRewriter()
127 Pass.TA.replaceStmt(*scope.Begin, "@autoreleasepool {"); in ~AutoreleasePoolRewriter()
128 Pass.TA.removeStmt(*scope.End); in ~AutoreleasePoolRewriter()
129 Stmt::child_iterator retI = scope.End; in ~AutoreleasePoolRewriter()
138 SourceRange(scope.getIndentedRange().getBegin(), in ~AutoreleasePoolRewriter()
140 scope.CompoundParent->getLocStart()); in ~AutoreleasePoolRewriter()
142 Pass.TA.replaceStmt(*scope.Begin, "@autoreleasepool {"); in ~AutoreleasePoolRewriter()
143 Pass.TA.replaceStmt(*scope.End, "}"); in ~AutoreleasePoolRewriter()
144 Pass.TA.increaseIndentation(scope.getIndentedRange(), in ~AutoreleasePoolRewriter()
145 scope.CompoundParent->getLocStart()); in ~AutoreleasePoolRewriter()
153 PoolScope &scope = *scpI; in ~AutoreleasePoolRewriter() local
155 relI = scope.Releases.begin(), in ~AutoreleasePoolRewriter()
156 relE = scope.Releases.end(); relI != relE; ++relI) { in ~AutoreleasePoolRewriter()
208 PoolScope &scope = Scopes.back(); in VisitCompoundStmt() local
209 scope.End = I; in VisitCompoundStmt()
210 handlePoolScope(scope, S); in VisitCompoundStmt()
254 NameReferenceChecker(ASTContext &ctx, PoolScope &scope, in NameReferenceChecker() argument
259 ScopeRange = SourceRange((*scope.Begin)->getLocStart(), in NameReferenceChecker()
260 (*scope.End)->getLocStart()); in NameReferenceChecker()
296 void handlePoolScope(PoolScope &scope, CompoundStmt *compoundS) { in handlePoolScope() argument
302 Stmt::child_iterator SI = scope.End, SE = compoundS->body_end(); in handlePoolScope()
311 scope.IsFollowedBySimpleReturnStmt = true; in handlePoolScope()
316 nameUsedOutsideScope = !NameReferenceChecker(Pass.Ctx, scope, in handlePoolScope()
331 (*scope.Begin)->getLocStart()); in handlePoolScope()
333 (*scope.End)->getLocStart()); in handlePoolScope()
340 ReleaseCollector releaseColl(scope.PoolVar, scope.Releases); in handlePoolScope()
341 Stmt::child_iterator I = scope.Begin; in handlePoolScope()
343 for (; I != scope.End; ++I) in handlePoolScope()
347 PoolVars[scope.PoolVar].Scopes.push_back(scope); in handlePoolScope()