Ignore:
Timestamp:
Oct 13, 2023, 7:13:21 PM (2 years ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
a97b9ed, bab2917
Parents:
85034ed (diff), 0bf0b978 (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/AST/Convert.cpp

    r85034ed r8cbe732  
    269269                        node->location,
    270270                        Type::StorageClasses( node->storage.val ),
    271             get<Type>().accept1( node->base ),
     271                        get<Type>().accept1( node->base ),
    272272                        LinkageSpec::Spec( node->linkage.val )
    273273                );
     
    567567        }
    568568
    569     const ast::WhenClause * visit( const ast::WhenClause * node ) override final {
     569        const ast::WhenClause * visit( const ast::WhenClause * node ) override final {
    570570                // There is no old-AST WhenClause, so this should never be called.
    571571                assert( !node );
     
    604604        }
    605605
    606     const ast::Stmt * visit( const ast::WaitUntilStmt * node ) override final {
    607         // There is no old-AST WaitUntilStmt, so this should never be called.
     606        const ast::Stmt * visit( const ast::WaitUntilStmt * node ) override final {
     607                // There is no old-AST WaitUntilStmt, so this should never be called.
    608608                assert( !node );
    609609                return nullptr;
     
    648648                );
    649649                return stmtPostamble( stmt, node );
     650        }
     651
     652        const ast::Stmt * visit( const ast::CorunStmt * node ) override final {
     653                // There is no old-AST CorunStmt, so this should never be called.
     654                assert( !node );
     655                return nullptr;
    650656        }
    651657
     
    853859                // New workd:   one public type: node->result, plus node->underlyer only to support roundtrip conversion
    854860                //              preserving underlyer because the correct type for string literals is complicated to construct,
    855             //              and distinguishing a string from other literals using the type is hard to do accurately
     861                //              and distinguishing a string from other literals using the type is hard to do accurately
    856862                // Both worlds: the outer, expression-level type can change during resolution
    857863                //              for a string, that's char[k] before-resolve and char * after
     
    859865                //              for a string, that's char[k] always
    860866                // Both worlds: the "rep" field of a constant is the C source file fragment that compiles to the desired value
    861         //              for a string, that includes outer quotes, backslashes, et al cases from the Literals test
     867                //              for a string, that includes outer quotes, backslashes, et al cases from the Literals test
    862868                ConstantExpr *rslt = new ConstantExpr(Constant(
    863869                        get<Type>().accept1(node->underlyer),
     
    15181524                return strict_dynamic_cast< ast::Decl * >( node );
    15191525        }
    1520        
     1526
    15211527        ConverterOldToNew() = default;
    15221528        ConverterOldToNew(const ConverterOldToNew &) = delete;
     
    15811587        ast::Label make_label(const Label* old) {
    15821588                CodeLocation const & location =
    1583                     ( old->labelled ) ? old->labelled->location : CodeLocation();
     1589                        ( old->labelled ) ? old->labelled->location : CodeLocation();
    15841590                return ast::Label(
    15851591                        location,
     
    22402246        // TypeSubstitution shouldn't exist yet in old.
    22412247        ast::TypeSubstitution * convertTypeSubstitution(const TypeSubstitution * old) {
    2242                
    22432248                if (!old) return nullptr;
    22442249                if (old->empty()) return nullptr;
     
    22852290        ast::Expr * visitBaseExpr_SkipResultType( const Expression * old, ast::Expr * nw) {
    22862291
    2287                 nw->env    = convertTypeSubstitution(old->env);
     2292                nw->env = convertTypeSubstitution(old->env);
    22882293
    22892294                nw->extension = old->extension;
     
    28562861
    28572862        virtual void visit( const EnumInstType * old ) override final {
    2858                 ast::EnumInstType * ty; 
     2863                ast::EnumInstType * ty;
    28592864                if ( old->baseEnum ) {
    28602865                        ty = new ast::EnumInstType{
Note: See TracChangeset for help on using the changeset viewer.