Ignore:
Timestamp:
Jun 11, 2023, 6:42:36 PM (3 years ago)
Author:
caparsons <caparson@…>
Branches:
ast-experimental, master
Children:
32a4f3e, 576aadb, 62d62db, 8a930c03
Parents:
1db6d70 (diff), 0658672 (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/ResolvExpr/Resolver.cc

    r1db6d70 r38e266ca  
    11061106
    11071107                /// Removes cast to type of argument (unlike StripCasts, also handles non-generated casts)
    1108                 void removeExtraneousCast( ast::ptr<ast::Expr> & expr, const ast::SymbolTable & symtab ) {
     1108                void removeExtraneousCast( ast::ptr<ast::Expr> & expr ) {
    11091109                        if ( const ast::CastExpr * castExpr = expr.as< ast::CastExpr >() ) {
    11101110                                if ( typesCompatible( castExpr->arg->result, castExpr->result ) ) {
     
    11961196                ast::ptr< ast::Expr > castExpr = new ast::CastExpr{ untyped, type };
    11971197                ast::ptr< ast::Expr > newExpr = findSingleExpression( castExpr, context );
    1198                 removeExtraneousCast( newExpr, context.symtab );
     1198                removeExtraneousCast( newExpr );
    11991199                return newExpr;
    12001200        }
     
    12611261                static size_t traceId;
    12621262                Resolver_new( const ast::TranslationGlobal & global ) :
     1263                        ast::WithSymbolTable(ast::SymbolTable::ErrorDetection::ValidateOnAdd),
    12631264                        context{ symtab, global } {}
    12641265                Resolver_new( const ResolveContext & context ) :
     
    20402041                const ast::Type * initContext = currentObject.getCurrentType();
    20412042
    2042                 removeExtraneousCast( newExpr, symtab );
     2043                removeExtraneousCast( newExpr );
    20432044
    20442045                // check if actual object's type is char[]
Note: See TracChangeset for help on using the changeset viewer.