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