Ignore:
Timestamp:
Dec 16, 2023, 1:01:44 AM (22 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
b7898ac
Parents:
0fa0201d (diff), 69ab896 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ControlStruct/MultiLevelExit.cpp

    r0fa0201d r5546eee4  
    99// Author           : Andrew Beach
    1010// Created On       : Mon Nov  1 13:48:00 2021
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Sep  8 17:04:00 2023
    13 // Update Count     : 36
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Dec 14 17:34:12 2023
     13// Update Count     : 39
    1414//
    1515
     
    254254                                if ( enclosing_control_structures.empty() ) {
    255255                                          SemanticError( stmt->location,
    256                                                                          "'break' outside a loop, 'switch', or labelled block" );
     256                                                                         "\"break\" outside a loop, \"switch\", or labelled block" );
    257257                                }
    258258                                targetEntry = findEnclosingControlStructure( isBreakTarget );
     
    268268                // Ensure that selected target is valid.
    269269                if ( targetEntry == enclosing_control_structures.rend() || ( isContinue && ! isContinueTarget( *targetEntry ) ) ) {
    270                         SemanticError( stmt->location, toString( (isContinue ? "'continue'" : "'break'"),
     270                        SemanticError( stmt->location, toString( (isContinue ? "\"continue\"" : "\"break\""),
    271271                                                        " target must be an enclosing ", (isContinue ? "loop: " : "control structure: "),
    272272                                                        stmt->originalTarget ) );
     
    279279                // Check that target is valid.
    280280                if ( targetEntry == enclosing_control_structures.rend() ) {
    281                         SemanticError( stmt->location, "'fallthrough' must be enclosed in a 'switch' or 'choose'" );
     281                        SemanticError( stmt->location, "\"fallthrough\" must be enclosed in a \"switch\" or \"choose\"" );
    282282                }
    283283                if ( ! stmt->target.empty() ) {
    284284                        // Labelled fallthrough: target must be a valid fallthough label.
    285285                        if ( ! fallthrough_labels.count( stmt->target ) ) {
    286                                 SemanticError( stmt->location, toString( "'fallthrough' target must be a later case statement: ",
     286                                SemanticError( stmt->location, toString( "\"fallthrough\" target must be a later case statement: ",
    287287                                                                                                                   stmt->originalTarget ) );
    288288                        }
     
    296296                // Check if in switch or choose statement.
    297297                if ( targetEntry == enclosing_control_structures.rend() ) {
    298                         SemanticError( stmt->location, "'fallthrough' must be enclosed in a 'switch' or 'choose'" );
     298                        SemanticError( stmt->location, "\"fallthrough\" must be enclosed in a \"switch\" or \"choose\"" );
    299299                }
    300300
     
    309309                }
    310310                if ( ! foundDefault ) {
    311                         SemanticError( stmt->location, "'fallthrough default' must be enclosed in a 'switch' or 'choose'"
    312                                                    "control structure with a 'default' clause" );
     311                        SemanticError( stmt->location, "\"fallthrough default\" must be enclosed in a \"switch\" or \"choose\""
     312                                                   "control structure with a \"default\" clause" );
    313313                }
    314314                break;
     
    338338                // Check that fallthrough default comes before the default clause.
    339339                if ( ! targetEntry->isFallDefaultValid() ) {
    340                         SemanticError( stmt->location, "'fallthrough default' must precede the 'default' clause" );
     340                        SemanticError( stmt->location, "\"fallthrough default\" must precede the \"default\" clause" );
    341341                }
    342342                break;
     
    521521                assert(0);
    522522        }
    523         SemanticError( stmt->location, toString( "'return' may not appear in a ", context ) );
     523        SemanticError( stmt->location, "\"return\" may not appear in a %s", context );
    524524}
    525525
Note: See TracChangeset for help on using the changeset viewer.