- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Validate/EnumAndPointerDecay.cpp
re9e9f56 r11df881 10 10 // Created On : Tue Jun 28 15:50:00 2022 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Tue Sep 20 16:14:00 202213 // Update Count : 112 // Last Modified On : Tue Jul 12 14:45:00 2022 13 // Update Count : 0 14 14 // 15 15 … … 26 26 namespace { 27 27 28 struct EnumAndPointerDecayCore final : public ast::WithCodeLocation { 28 struct EnumAndPointerDecayCore final : public ast::WithGuards { 29 CodeLocation const * location = nullptr; 30 void previsit( ast::ParseNode const * node ); 29 31 ast::EnumDecl const * previsit( ast::EnumDecl const * decl ); 30 32 ast::FunctionDecl const * previsit( ast::FunctionDecl const * decl ); 31 33 ast::FunctionType const * previsit( ast::FunctionType const * type ); 32 34 }; 35 36 void EnumAndPointerDecayCore::previsit( ast::ParseNode const * node ) { 37 GuardValue( location ) = &node->location; 38 } 33 39 34 40 ast::EnumDecl const * EnumAndPointerDecayCore::previsit( … … 44 50 new ast::EnumInstType( decl, ast::CV::Const ) ); 45 51 } 52 GuardValue( location ) = &decl->location; 46 53 return mut; 47 54 } … … 72 79 ast::FunctionDecl const * decl ) { 73 80 auto mut = ast::mutate( decl ); 81 GuardValue( location ) = &decl->location; 74 82 ast::ArgumentFlag isVarArgs = mut->type->isVarArgs; 75 83 // It seems fixFunction (via fixFunctionList) does the pointer decay part.
Note:
See TracChangeset
for help on using the changeset viewer.