@@ -310,8 +310,8 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S,
310
310
unsigned &ParentScope = ((isa<Expr>(S) && !isa<StmtExpr>(S))
311
311
? origParentScope : independentParentScope);
312
312
313
- unsigned StmtsToSkip = 0u ;
314
-
313
+ unsigned StmtsToSkip = 0u ;
314
+
315
315
// If we found a label, remember that it is in ParentScope scope.
316
316
switch (S->getStmtClass ()) {
317
317
case Stmt::AddrLabelExprClass:
@@ -597,15 +597,6 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S,
597
597
LabelAndGotoScopes[S] = ParentScope;
598
598
break ;
599
599
600
- case Stmt::AttributedStmtClass: {
601
- AttributedStmt *AS = cast<AttributedStmt>(S);
602
- if (GetMustTailAttr (AS)) {
603
- LabelAndGotoScopes[AS] = ParentScope;
604
- MustTailStmts.push_back (AS);
605
- }
606
- break ;
607
- }
608
-
609
600
case Stmt::OpenACCComputeConstructClass: {
610
601
unsigned NewParentScope = Scopes.size ();
611
602
OpenACCComputeConstruct *CC = cast<OpenACCComputeConstruct>(S);
@@ -658,6 +649,13 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S,
658
649
Next = SC->getSubStmt ();
659
650
else if (LabelStmt *LS = dyn_cast<LabelStmt>(SubStmt))
660
651
Next = LS->getSubStmt ();
652
+ else if (AttributedStmt *AS = dyn_cast<AttributedStmt>(SubStmt)){
653
+ if (GetMustTailAttr (AS)) {
654
+ LabelAndGotoScopes[AS] = ParentScope;
655
+ MustTailStmts.push_back (AS);
656
+ }
657
+ Next = AS->getSubStmt ();
658
+ }
661
659
else
662
660
break ;
663
661
@@ -945,7 +943,7 @@ void JumpScopeChecker::CheckJump(Stmt *From, Stmt *To, SourceLocation DiagLoc,
945
943
946
944
unsigned FromScope = LabelAndGotoScopes[From];
947
945
unsigned ToScope = LabelAndGotoScopes[To];
948
-
946
+
949
947
// Common case: exactly the same scope, which is fine.
950
948
if (FromScope == ToScope) return ;
951
949
0 commit comments