Changeset 148ba7d
- Timestamp:
- Oct 25, 2021, 2:29:16 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- c600df1
- Parents:
- a36eb2d
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Pass.hpp
ra36eb2d r148ba7d 348 348 349 349 /// When this node is finished being visited, restore the value of a variable 350 /// You may assign to the return value to set the new value in the same statement. 350 351 template< typename T > 351 voidGuardValue( T& val ) {352 T& GuardValue( T& val ) { 352 353 at_cleanup( [ val ]( void * newVal ) { 353 354 * static_cast< T * >( newVal ) = val; 354 355 }, static_cast< void * >( & val ) ); 356 return val; 355 357 } 356 358 -
src/InitTweak/GenInit.cc
ra36eb2d r148ba7d 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Mon Oct 25 1 1:10:00 202113 // Update Count : 18 512 // Last Modified On : Mon Oct 25 13:53:00 2021 13 // Update Count : 186 14 14 // 15 15 #include "GenInit.h" … … 316 316 void HoistArrayDimension_NoResolve_New::previsit( 317 317 const ast::ObjectDecl * decl ) { 318 GuardValue( storageClasses ); 319 storageClasses = decl->storage; 318 GuardValue( storageClasses ) = decl->storage; 320 319 } 321 320 … … 377 376 378 377 void ReturnFixer_New::previsit( const ast::FunctionDecl * decl ) { 379 GuardValue( funcDecl ); 380 funcDecl = decl; 378 GuardValue( funcDecl ) = decl; 381 379 } 382 380
Note: See TracChangeset
for help on using the changeset viewer.