================ @@ -658,7 +649,13 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S, Next = SC->getSubStmt(); else if (LabelStmt *LS = dyn_cast<LabelStmt>(SubStmt)) Next = LS->getSubStmt(); - else + else if (AttributedStmt *AS = dyn_cast<AttributedStmt>(SubStmt)) { + if (GetMustTailAttr(AS)) { + LabelAndGotoScopes[AS] = ParentScope; + MustTailStmts.push_back(AS); + } + Next = AS->getSubStmt(); + } else ---------------- YutongZhuu wrote:
Please correct me if my understanding is incorrect. This function is basically doing a DFS on the AST and skipping the nodes that is not considered to be scope parents(also could you confirm attributes can not be scope parents?). If my understanding is correct, the node for attributes will be skipped and ``case Stmt::AttributedStmtClass`` never gets executed. https://github.com/llvm/llvm-project/pull/125370 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits