Home | History | Annotate | Download | only in Sema

Lines Matching refs:Scopes

27 /// into VLA and other protected scopes.  For example, this rejects:
36 /// scopes that are introduced by VLAs and other things that scope jumps like
38 /// because you can have multiple VLA scopes per compound statement, and most
39 /// compound statements don't introduce any scopes.
61 SmallVector<GotoScope, 48> Scopes;
91 Scopes.push_back(GotoScope(~0U, ~0U, ~0U, SourceLocation()));
104 /// two scopes.
107 // Inner scopes are created after outer scopes and therefore have
110 assert(Scopes[B].ParentScope < B);
111 B = Scopes[B].ParentScope;
113 assert(Scopes[A].ParentScope < A);
114 A = Scopes[A].ParentScope;
239 Scopes.push_back(GotoScope(ParentScope, Diags.first, Diags.second,
241 ParentScope = Scopes.size()-1;
282 Scopes.push_back(GotoScope(ParentScope,
284 ParentScope = Scopes.size()-1;
293 // If this is a statement, rather than an expression, scopes within it don't
343 Scopes.push_back(GotoScope(ParentScope,
348 BuildScopeInformation(TryBlock, (newParentScope = Scopes.size()-1));
353 Scopes.push_back(GotoScope(ParentScope,
358 (newParentScope = Scopes.size()-1));
409 Scopes.push_back(GotoScope(ParentScope,
414 BuildScopeInformation(TryPart, (newParentScope = Scopes.size()-1));
419 Scopes.push_back(GotoScope(ParentScope,
425 (newParentScope = Scopes.size()-1));
430 Scopes.push_back(GotoScope(ParentScope,
434 BuildScopeInformation(AF, (newParentScope = Scopes.size()-1));
450 Scopes.push_back(GotoScope(ParentScope,
455 (newParentScope = Scopes.size()-1));
463 Scopes.push_back(GotoScope(ParentScope,
467 BuildScopeInformation(AS->getSubStmt(), (newParentScope = Scopes.size()-1));
545 /// A path in is trivial if none of the entered scopes have an InDiag.
546 /// A path out is trivial is none of the exited scopes have an OutDiag.
573 "indirect jump didn't get added to scopes?");
593 "Referenced label didn't get added to scopes?");
602 // A path between scopes always consists of exitting zero or more
603 // scopes, then entering zero or more scopes. We build a set of
604 // of scopes S from which the target scope can be trivially
607 llvm::BitVector Reachable(Scopes.size(), false);
615 // Mark all the enclosing scopes from which you can safely jump
626 if (Scopes[Min].InDiag) break;
628 Min = Scopes[Min].ParentScope;
639 // to O(JumpScopes.size() / Scopes.size()): we only iterate
645 // If we find something reachable, mark all the scopes we just
647 for (unsigned S = I->first; S != Scope; S = Scopes[S].ParentScope)
658 if (Scopes[Scope].OutDiag) break;
660 Scope = Scopes[Scope].ParentScope;
700 if (Scopes[ToScopes[I]].InDiag)
701 S.Diag(Scopes[ToScopes[I]].Loc, Scopes[ToScopes[I]].InDiag);
704 /// Diagnose an indirect jump which is known to cross scopes.
715 for (unsigned I = JumpScope; I != Common; I = Scopes[I].ParentScope)
716 if (Scopes[I].OutDiag) {
718 S.Diag(Scopes[I].Loc, Scopes[I].OutDiag);
723 // Now walk into the scopes containing the label whose address was taken.
724 for (unsigned I = TargetScope; I != Common; I = Scopes[I].ParentScope)
725 if (IsCXX98CompatWarning(S, Scopes[I].InDiag))
727 else if (Scopes[I].InDiag) {
729 S.Diag(Scopes[I].Loc, Scopes[I].InDiag);
746 assert(LabelAndGotoScopes.count(From) && "Jump didn't get added to scopes?");
749 assert(LabelAndGotoScopes.count(To) && "Jump didn't get added to scopes?");
760 // Pull out (and reverse) any scopes we might need to diagnose skipping.
764 for (unsigned I = ToScope; I != CommonScope; I = Scopes[I].ParentScope) {
766 IsMicrosoftJumpWarning(JumpDiagError, Scopes[I].InDiag))
768 else if (IsCXX98CompatWarning(S, Scopes[I].InDiag))
770 else if (Scopes[I].InDiag)