Home | History | Annotate | Download | only in Sema

Lines Matching defs:Jump

1 //===--- JumpDiagnostics.cpp - Protected scope jump analysis ------*- C++ -*-=//
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
389 // Cannot jump into the middle of the condition.
418 // Jump from the catch into the try is not allowed either.
443 // Jump from __except or __finally into the __try are not allowed either.
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.
649 Stmt *Jump = Jumps.pop_back_val();
652 if (GotoStmt *GS = dyn_cast<GotoStmt>(Jump)) {
665 if (IndirectGotoStmt *IGS = dyn_cast<IndirectGotoStmt>(Jump)) {
674 SwitchStmt *SS = cast<SwitchStmt>(Jump);
693 /// asm goto jump might cross a protection boundary. Unlike direct jumps,
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
698 /// initializations and no teardowns. More formally, an indirect/asm jump
702 /// Jump-triviality is transitive but asymmetric.
708 /// jump between A and B is trivial for every indirect goto statement A
726 // down on the number of jump sites we'll have to consider later.
764 // every scope containing a jump site.
769 // entered, then verify that every jump scope can be trivially
779 // Mark all the enclosing scopes from which you can safely jump
795 // Walk through all the jump sites, checking that they can trivially
850 /// Produce primary diagnostic for an indirect jump statement.
851 static void DiagnoseIndirectOrAsmJumpStmt(Sema &S, Stmt *Jump,
855 bool IsAsmGoto = isa<GCCAsmStmt>(Jump);
856 S.Diag(Jump->getBeginLoc(), diag::err_indirect_goto_in_protected_scope)
863 /// Produce note diagnostics for a jump into a protected scope.
872 /// Diagnose an indirect jump which is known to cross scopes.
873 void JumpScopeChecker::DiagnoseIndirectOrAsmJump(Stmt *Jump, unsigned JumpScope,
885 DiagnoseIndirectOrAsmJumpStmt(S, Jump, Target, Diagnosed);
896 DiagnoseIndirectOrAsmJumpStmt(S, Jump, Target, Diagnosed);
900 // Diagnose this jump if it would be ill-formed in C++98.
902 bool IsAsmGoto = isa<GCCAsmStmt>(Jump);
903 S.Diag(Jump->getBeginLoc(),
912 /// CheckJump - Validate that the specified jump statement is valid: that it is
930 // If FromScope > ToScope, FromScope is more nested and the jump goes to a
947 // It's okay to jump out from a nested scope.
979 // Handle -Wc++98-compat warnings if the jump is well-formed.