Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    r138e29e r6ef2d81  
    921921                                Declaration * decl = extr->build();
    922922                                if ( decl ) {
    923                                         decl->location = cur->location;
    924923                                        * out++ = decl;
    925924                                } // if
     
    929928                        Declaration * decl = cur->build();
    930929                        if ( decl ) {
    931                                 decl->location = cur->location;
    932930                                * out++ = decl;
    933931                        } // if
    934932                } catch( SemanticError &e ) {
    935                         e.set_location( cur->location );
    936933                        errors.append( e );
    937934                } // try
     
    953950                        if ( decl ) {
    954951                                if ( DeclarationWithType * dwt = dynamic_cast< DeclarationWithType * >( decl ) ) {
    955                                         dwt->location = cur->location;
    956952                                        * out++ = dwt;
    957953                                } else if ( StructDecl * agg = dynamic_cast< StructDecl * >( decl ) ) {
    958954                                        StructInstType * inst = new StructInstType( Type::Qualifiers(), agg->get_name() );
    959                                         auto obj = new ObjectDecl( "", DeclarationNode::NoStorageClass, linkage, nullptr, inst, nullptr );
    960                                         obj->location = cur->location;
    961                                         * out++ = obj;
     955                                        * out++ = new ObjectDecl( "", DeclarationNode::NoStorageClass, linkage, nullptr, inst, nullptr );
    962956                                        delete agg;
    963957                                } else if ( UnionDecl * agg = dynamic_cast< UnionDecl * >( decl ) ) {
    964958                                        UnionInstType * inst = new UnionInstType( Type::Qualifiers(), agg->get_name() );
    965                                         auto obj = new ObjectDecl( "", DeclarationNode::NoStorageClass, linkage, nullptr, inst, nullptr );
    966                                         obj->location = cur->location;
    967                                         * out++ = obj;
     959                                        * out++ = new ObjectDecl( "", DeclarationNode::NoStorageClass, linkage, nullptr, inst, nullptr );
    968960                                } // if
    969961                        } // if
    970962                } catch( SemanticError &e ) {
    971                         e.set_location( cur->location );
    972963                        errors.append( e );
    973964                } // try
     
    988979                        * out++ = cur->buildType();
    989980                } catch( SemanticError &e ) {
    990                         e.set_location( cur->location );
    991981                        errors.append( e );
    992982                } // try
Note: See TracChangeset for help on using the changeset viewer.