Changeset 38e266ca for src/ResolvExpr/Resolver.cc
- Timestamp:
- Jun 11, 2023, 6:42:36 PM (3 years ago)
- 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. - File:
-
- 1 edited
-
src/ResolvExpr/Resolver.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Resolver.cc
r1db6d70 r38e266ca 1106 1106 1107 1107 /// 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 ) { 1109 1109 if ( const ast::CastExpr * castExpr = expr.as< ast::CastExpr >() ) { 1110 1110 if ( typesCompatible( castExpr->arg->result, castExpr->result ) ) { … … 1196 1196 ast::ptr< ast::Expr > castExpr = new ast::CastExpr{ untyped, type }; 1197 1197 ast::ptr< ast::Expr > newExpr = findSingleExpression( castExpr, context ); 1198 removeExtraneousCast( newExpr , context.symtab);1198 removeExtraneousCast( newExpr ); 1199 1199 return newExpr; 1200 1200 } … … 1261 1261 static size_t traceId; 1262 1262 Resolver_new( const ast::TranslationGlobal & global ) : 1263 ast::WithSymbolTable(ast::SymbolTable::ErrorDetection::ValidateOnAdd), 1263 1264 context{ symtab, global } {} 1264 1265 Resolver_new( const ResolveContext & context ) : … … 2040 2041 const ast::Type * initContext = currentObject.getCurrentType(); 2041 2042 2042 removeExtraneousCast( newExpr , symtab);2043 removeExtraneousCast( newExpr ); 2043 2044 2044 2045 // check if actual object's type is char[]
Note:
See TracChangeset
for help on using the changeset viewer.