@@ -1501,3 +1501,41 @@ class TranslatedVlaDeclarationStmt extends TranslatedStmt {
1501
1501
1502
1502
override Instruction getChildSuccessorInternal ( TranslatedElement child , EdgeKind kind ) { none ( ) }
1503
1503
}
1504
+
1505
+ class TranslatedCoReturnStmt extends TranslatedStmt {
1506
+ override CoReturnStmt stmt ;
1507
+
1508
+ private TranslatedExpr getTranslatedOperand ( ) {
1509
+ result = getTranslatedExpr ( stmt .getOperand ( ) .getFullyConverted ( ) )
1510
+ }
1511
+
1512
+ override TranslatedExpr getChildInternal ( int id ) {
1513
+ id = 0 and
1514
+ result = this .getTranslatedOperand ( )
1515
+ }
1516
+
1517
+ override Instruction getFirstInstruction ( EdgeKind kind ) {
1518
+ result = this .getTranslatedOperand ( ) .getFirstInstruction ( kind )
1519
+ }
1520
+
1521
+ override Instruction getALastInstructionInternal ( ) {
1522
+ result = this .getInstruction ( OnlyInstructionTag ( ) )
1523
+ }
1524
+
1525
+ override predicate hasInstruction ( Opcode opcode , InstructionTag tag , CppType resultType ) {
1526
+ tag = OnlyInstructionTag ( ) and
1527
+ opcode instanceof Opcode:: NoOp and
1528
+ resultType = getVoidType ( )
1529
+ }
1530
+
1531
+ override Instruction getInstructionSuccessorInternal ( InstructionTag tag , EdgeKind kind ) {
1532
+ tag = OnlyInstructionTag ( ) and
1533
+ result = this .getParent ( ) .getChildSuccessor ( this , kind )
1534
+ }
1535
+
1536
+ override Instruction getChildSuccessorInternal ( TranslatedElement child , EdgeKind kind ) {
1537
+ child = this .getTranslatedOperand ( ) and
1538
+ kind instanceof GotoEdge and
1539
+ result = this .getInstruction ( OnlyInstructionTag ( ) )
1540
+ }
1541
+ }
0 commit comments