Changeset a783c74
- Timestamp:
- Mar 11, 2026, 5:47:25 PM (44 hours ago)
- Branches:
- master
- Children:
- 43b6516
- Parents:
- 4c5ce70
- File:
-
- 1 edited
-
src/ControlStruct/HoistControlDecls.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ControlStruct/HoistControlDecls.cpp
r4c5ce70 ra783c74 9 9 // Author : Andrew Beach 10 10 // Created On : Fri Dec 3 15:34:00 2021 11 // Last Modified By : Andrew Beach12 // Last Modified On : Wed Jul 24 12:00:00 202413 // Update Count : 311 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 5 13:40:58 2026 13 // Update Count : 80 14 14 // 15 15 … … 29 29 // If no hoisting is needed (no declaration), then make no changes. 30 30 if ( stmt->inits.size() == 0 ) { 31 // if( /* no conditional declarations */ ... ) ...31 // while ( /* no conditional declarations */ ... ) ... 32 32 return stmt; 33 33 } 34 34 35 35 StmtT * mutStmt = mutate( stmt ); 36 36 37 CompoundStmt * block = new CompoundStmt( stmt->location ); 37 38 // {} 38 39 39 // Label: if( int x = f(), y = g(); ... ) ...40 // Label: while ( int x = f(), y = g(); ... ) ... 40 41 // link declarations into compound statement 41 42 for ( const Stmt * next : mutStmt->inits ) { … … 54 55 // int y = g(); 55 56 // } 56 // if( ... ) ...57 // while ( ... ) ... 57 58 58 59 block->kids.push_back( mutStmt ); … … 60 61 // int x = f(); 61 62 // int y = g(); 62 // if( ... ) ...63 // while ( ... ) ... 63 64 // } 65 64 66 return block; 65 67 }
Note:
See TracChangeset
for help on using the changeset viewer.