Changeset 62d62db for src/ResolvExpr
- Timestamp:
- Jun 12, 2023, 6:06:26 PM (2 years ago)
- Branches:
- ast-experimental, master
- Children:
- e172f42
- Parents:
- 24d6572 (diff), 38e266ca (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. - Location:
- src/ResolvExpr
- Files:
-
- 2 edited
-
CommonType.cc (modified) (1 diff)
-
Resolver.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CommonType.cc
r24d6572 r62d62db 1035 1035 void postvisit( const ast::TraitInstType * ) {} 1036 1036 1037 void postvisit( const ast::TypeInstType * inst) {}1038 1039 void postvisit( const ast::TupleType * tuple ) {1037 void postvisit( const ast::TypeInstType * ) {} 1038 1039 void postvisit( const ast::TupleType * tuple ) { 1040 1040 tryResolveWithTypedEnum( tuple ); 1041 1041 } -
src/ResolvExpr/Resolver.cc
r24d6572 r62d62db 1107 1107 1108 1108 /// Removes cast to type of argument (unlike StripCasts, also handles non-generated casts) 1109 void removeExtraneousCast( ast::ptr<ast::Expr> & expr , const ast::SymbolTable & symtab) {1109 void removeExtraneousCast( ast::ptr<ast::Expr> & expr ) { 1110 1110 if ( const ast::CastExpr * castExpr = expr.as< ast::CastExpr >() ) { 1111 1111 if ( typesCompatible( castExpr->arg->result, castExpr->result ) ) { … … 1197 1197 ast::ptr< ast::Expr > castExpr = new ast::CastExpr{ untyped, type }; 1198 1198 ast::ptr< ast::Expr > newExpr = findSingleExpression( castExpr, context ); 1199 removeExtraneousCast( newExpr , context.symtab);1199 removeExtraneousCast( newExpr ); 1200 1200 return newExpr; 1201 1201 } … … 1262 1262 static size_t traceId; 1263 1263 Resolver_new( const ast::TranslationGlobal & global ) : 1264 ast::WithSymbolTable(ast::SymbolTable::ErrorDetection::ValidateOnAdd), 1264 1265 context{ symtab, global } {} 1265 1266 Resolver_new( const ResolveContext & context ) : … … 2041 2042 const ast::Type * initContext = currentObject.getCurrentType(); 2042 2043 2043 removeExtraneousCast( newExpr , symtab);2044 removeExtraneousCast( newExpr ); 2044 2045 2045 2046 // check if actual object's type is char[]
Note:
See TracChangeset
for help on using the changeset viewer.