Changeset 33b7d49
- Timestamp:
- Mar 15, 2022, 10:14:05 AM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
- Children:
- 48a91e2
- Parents:
- d824715
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Util.cpp
rd824715 r33b7d49 10 10 // Created On : Wed Jan 19 9:46:00 2022 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri Feb 18 9:42:00 202213 // Update Count : 012 // Last Modified On : Fri Mar 11 18:07:00 2022 13 // Update Count : 1 14 14 // 15 15 16 16 #include "Util.hpp" 17 17 18 #include "Decl.hpp"19 18 #include "Node.hpp" 19 #include "ParseNode.hpp" 20 20 #include "Pass.hpp" 21 21 #include "TranslationUnit.hpp" 22 #include "Common/ScopedMap.h"23 22 24 23 #include <vector> … … 46 45 }; 47 46 47 /// Check that every note that can has a set CodeLocation. 48 struct SetCodeLocationsCore { 49 void previsit( const ParseNode * node ) { 50 assert( node->location.isSet() ); 51 } 52 }; 53 48 54 struct InvariantCore { 49 55 // To save on the number of visits: this is a kind of composed core. 50 56 // None of the passes should make changes so ordering doesn't matter. 51 57 NoStrongCyclesCore no_strong_cycles; 58 SetCodeLocationsCore set_code_locations; 52 59 53 60 void previsit( const Node * node ) { 54 61 no_strong_cycles.previsit( node ); 62 } 63 64 void previsit( const ParseNode * node ) { 65 no_strong_cycles.previsit( node ); 66 set_code_locations.previsit( node ); 55 67 } 56 68 -
src/Common/CodeLocationTools.cpp
rd824715 r33b7d49 9 9 // Author : Andrew Beach 10 10 // Created On : Fri Dec 4 15:42:00 2020 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Feb 1 09:14:39202213 // Update Count : 311 // Last Modified By : Andrew Beach 12 // Last Modified On : Mon Mar 14 15:14:00 2022 13 // Update Count : 4 14 14 // 15 15 … … 239 239 }; 240 240 241 class LocalFillCore : public ast::WithGuards { 242 CodeLocation const * parent; 243 public: 244 LocalFillCore( CodeLocation const & location ) : parent( &location ) { 245 assert( location.isSet() ); 246 } 247 248 template<typename node_t> 249 auto previsit( node_t const * node ) 250 -> typename std::enable_if<has_code_location<node_t>::value, node_t const *>::type { 251 if ( node->location.isSet() ) { 252 GuardValue( parent ) = &node->location; 253 return node; 254 } else { 255 node_t * mut = ast::mutate( node ); 256 mut->location = *parent; 257 return mut; 258 } 259 } 260 }; 261 241 262 } // namespace 242 263 … … 278 299 ast::Pass<FillCore>::run( unit ); 279 300 } 301 302 ast::Node const * localFillCodeLocations( 303 CodeLocation const & location , ast::Node const * node ) { 304 ast::Pass<LocalFillCore> visitor( location ); 305 return node->accept( visitor ); 306 } -
src/Common/CodeLocationTools.hpp
rd824715 r33b7d49 10 10 // Created On : Fri Dec 4 15:35:00 2020 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Dec 9 9:53:00 202013 // Update Count : 112 // Last Modified On : Mon Mar 14 15:14:00 2022 13 // Update Count : 2 14 14 // 15 15 16 16 #pragma once 17 17 18 class CodeLocation; 18 19 namespace ast { 20 class Node; 19 21 class TranslationUnit; 20 22 } … … 28 30 // Assign a nearby code-location to any unset code locations in the forest. 29 31 void forceFillCodeLocations( ast::TranslationUnit & unit ); 32 33 // Fill in code-locations with a parent code location, 34 // using the provided CodeLocation as the base. 35 ast::Node const * 36 localFillCodeLocations( CodeLocation const &, ast::Node const * ); -
src/ControlStruct/ExceptTranslateNew.cpp
rd824715 r33b7d49 9 9 // Author : Andrew Beach 10 10 // Created On : Mon Nov 8 11:53:00 2021 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Mon Jan 31 18:49:58202213 // Update Count : 111 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri Mar 11 17:51:00 2022 13 // Update Count : 2 14 14 // 15 15 … … 27 27 28 28 typedef std::list<ast::CatchStmt*> CatchList; 29 30 void split( CatchList& allHandlers, CatchList& terHandlers,31 CatchList& resHandlers ) {32 while ( !allHandlers.empty() ) {33 ast::CatchStmt * stmt = allHandlers.front();34 allHandlers.pop_front();35 if (stmt->kind == ast::ExceptionKind::Terminate) {36 terHandlers.push_back(stmt);37 } else {38 resHandlers.push_back(stmt);39 }40 }41 }42 29 43 30 void appendDeclStmt( ast::CompoundStmt * block, ast::DeclWithType * item ) { … … 171 158 ast::Stmt * create_resume_rethrow( const ast::ThrowStmt * throwStmt ); 172 159 173 // Types used in translation, make sure to use clone. 160 // Types used in translation, first group are internal. 161 ast::ObjectDecl * make_index_object( CodeLocation const & ) const; 162 ast::ObjectDecl * make_exception_object( CodeLocation const & ) const; 163 ast::ObjectDecl * make_bool_object( CodeLocation const & ) const; 164 ast::ObjectDecl * make_voidptr_object( CodeLocation const & ) const; 165 ast::ObjectDecl * make_unused_index_object( CodeLocation const & ) const; 174 166 // void (*function)(); 175 ast::FunctionDecl * try_func_t;167 ast::FunctionDecl * make_try_function( CodeLocation const & ) const; 176 168 // void (*function)(int, exception); 177 ast::FunctionDecl * catch_func_t;169 ast::FunctionDecl * make_catch_function( CodeLocation const & ) const; 178 170 // int (*function)(exception); 179 ast::FunctionDecl * ma tch_func_t;171 ast::FunctionDecl * make_match_function( CodeLocation const & ) const; 180 172 // bool (*function)(exception); 181 ast::FunctionDecl * handle_func_t;173 ast::FunctionDecl * make_handle_function( CodeLocation const & ) const; 182 174 // void (*function)(__attribute__((unused)) void *); 183 ast::FunctionDecl * finally_func_t; 184 185 ast::StructInstType * create_except_type() { 186 assert( except_decl ); 187 return new ast::StructInstType( except_decl ); 188 } 189 void init_func_types(); 175 ast::FunctionDecl * make_finally_function( CodeLocation const & ) const; 190 176 191 177 public: … … 199 185 }; 200 186 201 void TryMutatorCore::init_func_types() { 187 ast::ObjectDecl * TryMutatorCore::make_index_object( 188 CodeLocation const & location ) const { 189 return new ast::ObjectDecl( 190 location, 191 "__handler_index", 192 new ast::BasicType(ast::BasicType::SignedInt), 193 nullptr, //init 194 ast::Storage::Classes{}, 195 ast::Linkage::Cforall 196 ); 197 } 198 199 ast::ObjectDecl * TryMutatorCore::make_exception_object( 200 CodeLocation const & location ) const { 202 201 assert( except_decl ); 203 204 ast::ObjectDecl index_obj( 205 {}, 206 "__handler_index", 207 new ast::BasicType(ast::BasicType::SignedInt) 208 ); 209 ast::ObjectDecl exception_obj( 210 {}, 202 return new ast::ObjectDecl( 203 location, 211 204 "__exception_inst", 212 205 new ast::PointerType( 213 206 new ast::StructInstType( except_decl ) 214 207 ), 215 NULL 216 ); 217 ast::ObjectDecl bool_obj( 218 {}, 208 nullptr, //init 209 ast::Storage::Classes{}, 210 ast::Linkage::Cforall 211 ); 212 } 213 214 ast::ObjectDecl * TryMutatorCore::make_bool_object( 215 CodeLocation const & location ) const { 216 return new ast::ObjectDecl( 217 location, 219 218 "__ret_bool", 220 219 new ast::BasicType( ast::BasicType::Bool ), … … 225 224 std::vector<ast::ptr<ast::Attribute>>{ new ast::Attribute( "unused" ) } 226 225 ); 227 ast::ObjectDecl voidptr_obj( 228 {}, 226 } 227 228 ast::ObjectDecl * TryMutatorCore::make_voidptr_object( 229 CodeLocation const & location ) const { 230 return new ast::ObjectDecl( 231 location, 229 232 "__hook", 230 233 new ast::PointerType( … … 237 240 std::vector<ast::ptr<ast::Attribute>>{ new ast::Attribute( "unused" ) } 238 241 ); 239 240 ast::ObjectDecl unused_index_obj( 241 {}, 242 } 243 244 ast::ObjectDecl * TryMutatorCore::make_unused_index_object( 245 CodeLocation const & location ) const { 246 return new ast::ObjectDecl( 247 location, 242 248 "__handler_index", 243 249 new ast::BasicType(ast::BasicType::SignedInt), … … 248 254 std::vector<ast::ptr<ast::Attribute>>{ new ast::Attribute( "unused" ) } 249 255 ); 250 //unused_index_obj->attributes.push_back( new Attribute( "unused" ) ); 251 252 try_func_t = new ast::FunctionDecl( 253 {}, 256 } 257 258 ast::FunctionDecl * TryMutatorCore::make_try_function( 259 CodeLocation const & location ) const { 260 return new ast::FunctionDecl( 261 location, 254 262 "try", 255 263 {}, //forall … … 260 268 ast::Linkage::Cforall 261 269 ); 262 263 catch_func_t = new ast::FunctionDecl( 264 {}, 270 } 271 272 ast::FunctionDecl * TryMutatorCore::make_catch_function( 273 CodeLocation const & location ) const { 274 return new ast::FunctionDecl( 275 location, 265 276 "catch", 266 277 {}, //forall 267 { ast::deepCopy(&index_obj), ast::deepCopy(&exception_obj)},//param278 { make_index_object( location ), make_exception_object( location ) }, 268 279 {}, //return void 269 280 nullptr, … … 271 282 ast::Linkage::Cforall 272 283 ); 273 274 match_func_t = new ast::FunctionDecl( 275 {}, 284 } 285 286 ast::FunctionDecl * TryMutatorCore::make_match_function( 287 CodeLocation const & location ) const { 288 return new ast::FunctionDecl( 289 location, 276 290 "match", 277 291 {}, //forall 278 { ast::deepCopy(&exception_obj)},279 { ast::deepCopy(&unused_index_obj)},292 { make_exception_object( location ) }, 293 { make_unused_index_object( location ) }, 280 294 nullptr, 281 295 ast::Storage::Classes{}, 282 296 ast::Linkage::Cforall 283 297 ); 284 285 handle_func_t = new ast::FunctionDecl( 286 {}, 298 } 299 300 ast::FunctionDecl * TryMutatorCore::make_handle_function( 301 CodeLocation const & location ) const { 302 return new ast::FunctionDecl( 303 location, 287 304 "handle", 288 305 {}, //forall 289 { ast::deepCopy(&exception_obj)},290 { ast::deepCopy(&bool_obj)},306 { make_exception_object( location ) }, 307 { make_bool_object( location ) }, 291 308 nullptr, 292 309 ast::Storage::Classes{}, 293 310 ast::Linkage::Cforall 294 311 ); 295 296 finally_func_t = new ast::FunctionDecl( 297 {}, 312 } 313 314 ast::FunctionDecl * TryMutatorCore::make_finally_function( 315 CodeLocation const & location ) const { 316 return new ast::FunctionDecl( 317 location, 298 318 "finally", 299 319 {}, //forall 300 { ast::deepCopy(&voidptr_obj)},320 { make_voidptr_object( location ) }, 301 321 {}, //return void 302 322 nullptr, … … 304 324 ast::Linkage::Cforall 305 325 ); 306 307 //catch_func_t.get_parameters().push_back( index_obj.clone() );308 //catch_func_t.get_parameters().push_back( exception_obj.clone() );309 //match_func_t.get_returnVals().push_back( unused_index_obj );310 //match_func_t.get_parameters().push_back( exception_obj.clone() );311 //handle_func_t.get_returnVals().push_back( bool_obj.clone() );312 //handle_func_t.get_parameters().push_back( exception_obj.clone() );313 //finally_func_t.get_parameters().push_back( voidptr_obj.clone() );314 326 } 315 327 316 328 // TryStmt Mutation Helpers 317 318 /*319 ast::CompoundStmt * TryMutatorCore::take_try_block( ast::TryStmt *tryStmt ) {320 ast::CompoundStmt * block = tryStmt->body;321 tryStmt->body = nullptr;322 return block;323 }324 */325 329 326 330 ast::FunctionDecl * TryMutatorCore::create_try_wrapper( 327 331 const ast::CompoundStmt *body ) { 328 332 329 ast::FunctionDecl * ret = ast::deepCopy(try_func_t);333 ast::FunctionDecl * ret = make_try_function( body->location ); 330 334 ret->stmts = body; 331 335 return ret; … … 339 343 const CodeLocation loc = handlers.front()->location; 340 344 341 ast::FunctionDecl * func_t = ast::deepCopy(catch_func_t);345 ast::FunctionDecl * func_t = make_catch_function( loc ); 342 346 const ast::DeclWithType * index_obj = func_t->params.front(); 343 347 const ast::DeclWithType * except_obj = func_t->params.back(); … … 386 390 // handler->body = nullptr; 387 391 388 handler_wrappers.push_back( new ast::CaseStmt(loc, 392 handler_wrappers.push_back( new ast::CaseStmt(loc, 389 393 ast::ConstantExpr::from_int(loc, index) , 390 394 { block, new ast::ReturnStmt( loc, nullptr ) } … … 393 397 // TODO: Some sort of meaningful error on default perhaps? 394 398 395 /* 396 std::list<Statement*> stmt_handlers; 397 while ( !handler_wrappers.empty() ) { 398 stmt_handlers.push_back( handler_wrappers.front() ); 399 handler_wrappers.pop_front(); 400 } 401 */ 402 403 ast::SwitchStmt * handler_lookup = new ast::SwitchStmt(loc, 399 ast::SwitchStmt * handler_lookup = new ast::SwitchStmt( loc, 404 400 new ast::VariableExpr( loc, index_obj ), 405 401 std::move(handler_wrappers) 406 402 ); 407 ast::CompoundStmt * body = new ast::CompoundStmt(loc, 408 {handler_lookup}); 403 ast::CompoundStmt * body = new ast::CompoundStmt( loc, {handler_lookup} ); 409 404 410 405 func_t->stmts = body; … … 433 428 434 429 // Check for type match. 435 ast::VirtualCastExpr * vcex = new ast::VirtualCastExpr(loc, 430 ast::VirtualCastExpr * vcex = new ast::VirtualCastExpr(loc, 436 431 new ast::VariableExpr(loc, except_obj ), 437 432 local_except->get_type() … … 445 440 } 446 441 // Construct the match condition. 447 block->push_back( new ast::IfStmt(loc, 442 block->push_back( new ast::IfStmt(loc, 448 443 cond, modded_handler->body, nullptr ) ); 449 444 450 // xxx - how does this work in new ast451 //modded_handler->set_decl( nullptr );452 //modded_handler->set_cond( nullptr );453 //modded_handler->set_body( nullptr );454 //delete modded_handler;455 445 return block; 456 446 } … … 467 457 ast::CompoundStmt * body = new ast::CompoundStmt(loc); 468 458 469 ast::FunctionDecl * func_t = ast::deepCopy(match_func_t);459 ast::FunctionDecl * func_t = make_match_function( loc ); 470 460 const ast::DeclWithType * except_obj = func_t->params.back(); 471 461 … … 490 480 } 491 481 492 body->push_back( new ast::ReturnStmt(loc, 482 body->push_back( new ast::ReturnStmt(loc, 493 483 ast::ConstantExpr::from_int( loc, 0 ) )); 494 484 … … 525 515 ast::CompoundStmt * body = new ast::CompoundStmt(loc); 526 516 527 ast::FunctionDecl * func_t = ast::deepCopy(handle_func_t);517 ast::FunctionDecl * func_t = make_handle_function( loc ); 528 518 const ast::DeclWithType * except_obj = func_t->params.back(); 529 519 … … 535 525 ast::CompoundStmt * handling_code; 536 526 if (handler->body.as<ast::CompoundStmt>()) { 537 handling_code = 538 strict_dynamic_cast<ast::CompoundStmt*>(handler->body.get_and_mutate() );527 handling_code = strict_dynamic_cast<ast::CompoundStmt*>( 528 handler->body.get_and_mutate() ); 539 529 } else { 540 530 handling_code = new ast::CompoundStmt(loc); … … 600 590 const ast::CompoundStmt * body = finally->body; 601 591 602 ast::FunctionDecl * func_t = ast::deepCopy(finally_func_t);592 ast::FunctionDecl * func_t = make_finally_function( tryStmt->location ); 603 593 func_t->stmts = body; 604 594 605 // finally->set_block( nullptr );606 // delete finally;607 595 tryStmt->finally = nullptr; 608 609 596 610 597 return func_t; … … 617 604 618 605 const CodeLocation loc = finally_wrapper->location; 619 // Make Cleanup Attribute.620 /*621 std::list< ast::Attribute * > attributes;622 {623 std::list< > attr_params;624 attr_params.push_back( nameOf( finally_wrapper ) );625 attributes.push_back( new Attribute( "cleanup", attr_params ) );626 }627 */628 629 606 return new ast::ObjectDecl( 630 607 loc, … … 644 621 // return false; 645 622 const CodeLocation loc = throwStmt->location; 646 ast::Stmt * result = new ast::ReturnStmt(loc, 623 ast::Stmt * result = new ast::ReturnStmt(loc, 647 624 ast::ConstantExpr::from_bool( loc, false ) 648 625 ); 649 626 result->labels = throwStmt->labels; 650 // delete throwStmt; done by postvisit651 627 return result; 652 628 } … … 660 636 assert( nullptr == except_decl ); 661 637 except_decl = structDecl; 662 init_func_types();663 638 } else if ( structDecl->name == "__cfaehm_try_resume_node" ) { 664 639 assert( nullptr == node_decl ); … … 706 681 } 707 682 } 708 // split( mutStmt->handlers,709 // termination_handlers, resumption_handlers );710 683 711 684 if ( resumption_handlers.size() ) { -
src/InitTweak/FixGlobalInit.cc
rd824715 r33b7d49 113 113 accept_all(translationUnit, fixer); 114 114 115 // Say these magic declarations come at the end of the file. 116 CodeLocation const & location = translationUnit.decls.back()->location; 117 115 118 if ( !fixer.core.initStmts.empty() ) { 116 119 std::vector<ast::ptr<ast::Expr>> ctorParams; 117 if (inLibrary) ctorParams.emplace_back(ast::ConstantExpr::from_int({}, 200)); 118 auto initFunction = new ast::FunctionDecl({}, "__global_init__", {}, {}, {}, new ast::CompoundStmt({}, std::move(fixer.core.initStmts)), 119 ast::Storage::Static, ast::Linkage::C, {new ast::Attribute("constructor", std::move(ctorParams))}); 120 if (inLibrary) ctorParams.emplace_back(ast::ConstantExpr::from_int(location, 200)); 121 auto initFunction = new ast::FunctionDecl(location, 122 "__global_init__", {}, {}, {}, 123 new ast::CompoundStmt(location, std::move(fixer.core.initStmts)), 124 ast::Storage::Static, ast::Linkage::C, 125 {new ast::Attribute("constructor", std::move(ctorParams))}); 120 126 121 127 translationUnit.decls.emplace_back( initFunction ); … … 124 130 if ( !fixer.core.destroyStmts.empty() ) { 125 131 std::vector<ast::ptr<ast::Expr>> dtorParams; 126 if (inLibrary) dtorParams.emplace_back(ast::ConstantExpr::from_int({}, 200)); 127 auto destroyFunction = new ast::FunctionDecl({}, "__global_destroy__", {}, {}, {}, new ast::CompoundStmt({}, std::move(fixer.core.destroyStmts)), 128 ast::Storage::Static, ast::Linkage::C, {new ast::Attribute("destructor", std::move(dtorParams))}); 132 if (inLibrary) dtorParams.emplace_back(ast::ConstantExpr::from_int(location, 200)); 133 auto destroyFunction = new ast::FunctionDecl( location, 134 "__global_destroy__", {}, {}, {}, 135 new ast::CompoundStmt(location, std::move(fixer.core.destroyStmts)), 136 ast::Storage::Static, ast::Linkage::C, 137 {new ast::Attribute("destructor", std::move(dtorParams))}); 129 138 130 139 translationUnit.decls.emplace_back(destroyFunction); -
src/InitTweak/FixInitNew.cpp
rd824715 r33b7d49 16 16 #include "CodeGen/GenType.h" // for genPrettyType 17 17 #include "CodeGen/OperatorTable.h" 18 #include "Common/CodeLocationTools.hpp" 18 19 #include "Common/PassVisitor.h" // for PassVisitor, WithStmtsToAdd 19 20 #include "Common/SemanticError.h" // for SemanticError … … 553 554 ast::ptr<ast::Expr> guard = mutArg; 554 555 555 ast::ptr<ast::ObjectDecl> tmp = new ast::ObjectDecl( {}, "__tmp", mutResult, nullptr );556 ast::ptr<ast::ObjectDecl> tmp = new ast::ObjectDecl(loc, "__tmp", mutResult, nullptr ); 556 557 557 558 // create and resolve copy constructor … … 799 800 // to prevent warnings ('_unq0' may be used uninitialized in this function), 800 801 // insert an appropriate zero initializer for UniqueExpr temporaries. 801 ast::Init * makeInit( const ast::Type * t ) {802 ast::Init * makeInit( const ast::Type * t, CodeLocation const & loc ) { 802 803 if ( auto inst = dynamic_cast< const ast::StructInstType * >( t ) ) { 803 804 // initizer for empty struct must be empty 804 if ( inst->base->members.empty() ) return new ast::ListInit({}, {}); 805 if ( inst->base->members.empty() ) { 806 return new ast::ListInit( loc, {} ); 807 } 805 808 } else if ( auto inst = dynamic_cast< const ast::UnionInstType * >( t ) ) { 806 809 // initizer for empty union must be empty 807 if ( inst->base->members.empty() ) return new ast::ListInit({}, {}); 808 } 809 810 return new ast::ListInit( {}, { new ast::SingleInit( {}, ast::ConstantExpr::from_int({}, 0) ) } ); 810 if ( inst->base->members.empty() ) { 811 return new ast::ListInit( loc, {} ); 812 } 813 } 814 815 return new ast::ListInit( loc, { 816 new ast::SingleInit( loc, ast::ConstantExpr::from_int( loc, 0 ) ) 817 } ); 811 818 } 812 819 … … 832 839 } else { 833 840 // expr isn't a call expr, so create a new temporary variable to use to hold the value of the unique expression 834 mutExpr->object = new ast::ObjectDecl( mutExpr->location, toString("_unq", mutExpr->id), mutExpr->result, makeInit( mutExpr->result ) );841 mutExpr->object = new ast::ObjectDecl( mutExpr->location, toString("_unq", mutExpr->id), mutExpr->result, makeInit( mutExpr->result, mutExpr->location ) ); 835 842 mutExpr->var = new ast::VariableExpr( mutExpr->location, mutExpr->object ); 836 843 } … … 1229 1236 1230 1237 auto destructor = new ast::ObjectDecl(loc, memberDtorNamer.newName(), new ast::StructInstType( ast::dtorStruct ), new ast::ListInit(loc, { new ast::SingleInit(loc, thisExpr ), new ast::SingleInit(loc, new ast::CastExpr( dtorExpr, dtorType ) ) } ) ); 1231 destructor->attributes.push_back( new ast::Attribute( "cleanup", { new ast::VariableExpr( {}, ast::dtorStructDestroy ) } ) );1238 destructor->attributes.push_back( new ast::Attribute( "cleanup", { new ast::VariableExpr( loc, ast::dtorStructDestroy ) } ) ); 1232 1239 mutStmts->push_front( new ast::DeclStmt(loc, destructor ) ); 1233 1240 mutStmts->kids.splice( mutStmts->kids.begin(), stmtsToAdd ); … … 1323 1330 1324 1331 const ast::Expr * GenStructMemberCalls::postvisit( const ast::UntypedExpr * untypedExpr ) { 1325 // Expression * newExpr = untypedExpr;1326 1332 // xxx - functions returning ast::ptr seems wrong... 1327 1333 auto res = ResolvExpr::findVoidExpression( untypedExpr, symtab ); 1328 return res.release(); 1329 // return newExpr; 1334 // Fix CodeLocation (at least until resolver is fixed). 1335 auto fix = localFillCodeLocations( untypedExpr->location, res.release() ); 1336 return strict_dynamic_cast<const ast::Expr *>( fix ); 1330 1337 } 1331 1338 -
src/main.cc
rd824715 r33b7d49 32 32 33 33 #include "AST/Convert.hpp" 34 #include "AST/Print.hpp"35 34 #include "CompilationState.h" 36 35 #include "../config.h" // for CFA_LIBDIR -
tests/collections/.expect/vector-err-pass-perm-it-byval.txt
rd824715 r33b7d49 1 error: Unique best alternative includes deleted identifier in Generated Cast of:1 collections/vector-demo.cfa:95:1 error: Unique best alternative includes deleted identifier in Generated Cast of: 2 2 Application of 3 3 Deleted Expression
Note: See TracChangeset
for help on using the changeset viewer.