Changes in src/AST/Pass.hpp [c600df1:6cebfef]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Pass.hpp
rc600df1 r6cebfef 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.351 350 template< typename T > 352 T&GuardValue( T& val ) {351 void GuardValue( T& val ) { 353 352 at_cleanup( [ val ]( void * newVal ) { 354 353 * static_cast< T * >( newVal ) = val; 355 354 }, static_cast< void * >( & val ) ); 356 return val;357 355 } 358 356 … … 396 394 }; 397 395 398 /// Used to get a pointer to the wrapping TranslationUnit.399 struct WithConstTranslationUnit {400 const TranslationUnit * translationUnit = nullptr;401 402 const TranslationUnit & transUnit() const {403 assertf( translationUnit, "WithConstTranslationUnit not set-up." );404 return *translationUnit;405 }406 };407 408 396 } 409 397
Note:
See TracChangeset
for help on using the changeset viewer.