Changeset 58c5821
- Timestamp:
- Dec 22, 2023, 11:32:14 AM (12 months ago)
- Branches:
- master
- Children:
- 8b4faf6
- Parents:
- 116d7e2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
r116d7e2 r58c5821 189 189 if ( stmts.empty() ) { 190 190 return {}; 191 } else if ( 1 == stmts.size() ) { 192 return std::move( stmts.front() ); 191 193 } else { 192 194 auto block = new ast::CompoundStmt{ init->location, std::move( stmts ) }; … … 387 389 388 390 bool isDesignated( const ast::Init * init ) { 389 // return ( init ) ? ast::Pass<HasDesignations>::read( init ) : false; 390 ast::Pass<HasDesignations> finder; 391 maybe_accept( init, finder ); 392 return finder.core.result; 391 return ( init ) ? ast::Pass<HasDesignations>::read( init ) : false; 393 392 } 394 393 395 394 bool checkInitDepth( const ast::ObjectDecl * objDecl ) { 396 // return ( objDecl->init ) ? ast::Pass<InitDepthChecker::read( objDecl->init, objDecl->type ) : true; 397 ast::Pass<InitDepthChecker> checker( objDecl->type ); 398 maybe_accept( objDecl->init.get(), checker ); 399 return checker.core.result; 395 return ( objDecl->init ) ? ast::Pass<InitDepthChecker>::read( 396 objDecl->init.get(), objDecl->type.get() ) : true; 400 397 } 401 398
Note: See TracChangeset
for help on using the changeset viewer.