Lines Matching defs:IS
9 // This file implements the JumpScopeChecker class, which is used to diagnose
27 /// JumpScopeChecker - This object is used by Sema to diagnose invalid jumps
35 /// the target is unknown. Return statements with \c [[clang::musttail]] cannot
44 /// GotoScope - This is a record that we use to keep track of all of the
50 /// ParentScope - The index in ScopeMap of the parent scope. This is 0 for
51 /// the parent scope is the function body.
54 /// InDiag - The note to emit if there is a jump into this scope.
57 /// OutDiag - The note to emit if there is an indirect jump out
187 // storage duration is not in scope to a point where it is in scope
188 // is ill-formed unless the variable has scalar type, class type with
191 // the preceding types and is declared without an initializer.
195 // with automatic storage duration is not in scope to a point
196 // where it is in scope is ill-formed unless the variable has
197 // POD type and is declared without an initializer.
232 /// Build scope information for a declaration that is part of a DeclStmt.
306 // If this is a statement, rather than an expression, scopes within it don't
315 // If we found a label, remember that it is in ParentScope scope.
331 // "goto *&&lbl;" is a special case which we treat as equivalent
360 // Remember both what scope a goto is in as well as the fact that we have
369 // Remember both what scope a goto is in as well as the fact that we
379 IfStmt *IS = cast<IfStmt>(S);
380 if (!(IS->isConstexpr() || IS->isObjCAvailabilityCheck()))
383 unsigned Diag = IS->isConstexpr() ? diag::note_protected_by_constexpr_if
386 if (VarDecl *Var = IS->getConditionVariable())
391 Scopes.push_back(GotoScope(ParentScope, Diag, 0, IS->getBeginLoc()));
392 BuildScopeInformation(IS->getCond(), NewParentScope);
396 Scopes.push_back(GotoScope(ParentScope, Diag, 0, IS->getBeginLoc()));
397 BuildScopeInformation(IS->getThen(), NewParentScope);
398 if (Stmt *Else = IS->getElse()) {
400 Scopes.push_back(GotoScope(ParentScope, Diag, 0, IS->getBeginLoc()));
418 // Jump from the catch into the try is not allowed either.
464 // If this is a declstmt with a VLA definition, it defines a scope from here
489 // Jump from the catch to the finally or try is not valid.
501 // Jump from the finally to the try or catch is not valid.
518 // Recursively walk the AST for the @synchronized object expr, it is
549 // non-trivial cleanups of their captures. This is theoretically
695 /// since there's no way to know where the jump is going, we can't implicitly
697 /// Thus, an indirect/asm jump is "trivial" if it bypasses no
699 /// from A to B is trivial if the path out from A to DCA(A,B) is
700 /// trivial and the path in from DCA(A,B) to B is trivial, where
701 /// DCA(A,B) is the deepest common ancestor of A and B.
702 /// Jump-triviality is transitive but asymmetric.
704 /// A path in is trivial if none of the entered scopes have an InDiag.
705 /// A path out is trivial is none of the exited scopes have an OutDiag.
708 /// jump between A and B is trivial for every indirect goto statement A
872 /// Diagnose an indirect jump which is known to cross scopes.
912 /// CheckJump - Validate that the specified jump statement is valid: that it is
925 // Common case: exactly the same scope, which is fine.
930 // If FromScope > ToScope, FromScope is more nested and the jump goes to a
979 // Handle -Wc++98-compat warnings if the jump is well-formed.