Home | History | Annotate | Download | only in Analysis

Lines Matching refs:Scope

150 /// declared in the scope and link to position in previous scope this scope
155 /// - Before processing statements in scope (e.g. CompoundStmt) create
156 /// LocalScope object using CFGBuilder::ScopePos as link to previous scope
157 /// and set CFGBuilder::ScopePos to the end of new scope,
160 /// - For every normal (without jump) end of scope add to CFGBlock destructors
161 /// for objects in the current scope,
163 /// between CFGBuilder::ScopePos and local scope position saved for jump
173 /// const_iterator - Iterates local scope backwards and jumps to previous
174 /// scope on reaching the beginning of currently iterated scope.
176 const LocalScope* Scope;
179 /// Invalid iterator (with null Scope) has VarIter equal to 0.
187 : Scope(nullptr), VarIter(0) {}
192 : Scope(&S), VarIter(I) {
193 // Iterator to "end" of scope is not allowed. Handle it by going up
195 if (VarIter == 0 && Scope)
196 *this = Scope->Prev;
200 assert (Scope && "Dereferencing invalid iterator is not allowed");
202 return &Scope->Vars[VarIter - 1];
209 if (!Scope)
215 *this = Scope->Prev;
225 return Scope == rhs.Scope && VarIter == rhs.VarIter;
245 /// Iterator to variable in previous scope that was declared just before
246 /// begin of this scope.
250 /// Constructs empty scope linked to previous scope in specified place.
254 /// Begin of scope in direction of CFG building (backwards).
268 while (F.Scope != L.Scope) {
272 F = F.Scope->Prev;
381 // Current position in local scope.
585 LocalScope* createOrReuseLocalScope(LocalScope* Scope);
589 LocalScope* Scope = nullptr);
590 LocalScope* addLocalScopeForVarDecl(VarDecl *VD, LocalScope* Scope = nullptr);
1211 /// for objects in range of local scope positions. Use S as trigger statement
1296 /// createOrReuseLocalScope - If Scope is NULL create new LocalScope. Either
1298 LocalScope* CFGBuilder::createOrReuseLocalScope(LocalScope* Scope) {
1299 if (Scope)
1300 return Scope;
1307 /// that should create implicit scope (e.g. if/else substatements).
1312 LocalScope *Scope = nullptr;
1314 // For compound statement we will be creating explicit scope.
1319 Scope = addLocalScopeForDeclStmt(DS, Scope);
1324 // For any other statement scope will be implicit and as such will be
1331 /// reuse Scope if not NULL.
1333 LocalScope* Scope) {
1335 return Scope;
1339 Scope = addLocalScopeForVarDecl(VD, Scope);
1340 return Scope;
1344 /// create add scope for automatic objects and temporary objects bound to
1345 /// const reference. Will reuse Scope if not NULL.
1347 LocalScope* Scope) {
1349 return Scope;
1357 default: return Scope;
1372 return Scope;
1376 return Scope;
1385 return Scope;
1392 // Add the variable to scope
1393 Scope = createOrReuseLocalScope(Scope);
1394 Scope->addVar(VD);
1395 ScopePos = Scope->begin();
1397 return Scope;
1400 /// addLocalScopeAndDtors - For given statement add local scope for it and
1401 /// add destructors that will cleanup the scope. Will reuse Scope if not NULL.
2142 // Remove variable from local scope.
2167 // Save local scope position because in case of condition variable ScopePos
2171 // Create local scope for possible condition variable.
2172 // Store scope position. Add implicit destructor.
2197 // If branch is not a compound statement create implicit scope
2220 // If branch is not a compound statement create implicit scope
2384 // Save local scope position because in case of condition variable ScopePos
2388 // Create local scope for init statement and possible condition variable.
2390 // Store scope position for continue statement.
2453 // If body is not a compound statement create implicit scope
2669 // TODO: consider adding cleanups for the end of @autoreleasepool scope.
2729 // Save local scope position because in case of condition variable ScopePos
2733 // Create local scope for possible condition variable.
2734 // Store scope position for continue statement.
2775 // If body is not a compound statement create implicit scope
2957 // If body is not a compound statement create implicit scope
3058 // Save local scope position because in case of condition variable ScopePos
3062 // Create local scope for possible condition variable.
3063 // Store scope position. Add implicit destructor.
3112 // If body is not a compound statement create implicit scope
3341 // Save local scope position because in case of exception variable ScopePos
3345 // Create local scope for possible exception variable.
3346 // Store scope position. Add implicit destructor.
3394 // Save local scope position before the addition of the implicit variables.
3470 // Add implicit scope and dtors for loop variable.