Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/EnumAndPointerDecay.cpp

    r11df881 re9e9f56  
    1010// Created On       : Tue Jun 28 15:50:00 2022
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Tue Jul 12 14:45:00 2022
    13 // Update Count     : 0
     12// Last Modified On : Tue Sep 20 16:14:00 2022
     13// Update Count     : 1
    1414//
    1515
     
    2626namespace {
    2727
    28 struct EnumAndPointerDecayCore final : public ast::WithGuards {
    29         CodeLocation const * location = nullptr;
    30         void previsit( ast::ParseNode const * node );
     28struct EnumAndPointerDecayCore final : public ast::WithCodeLocation {
    3129        ast::EnumDecl const * previsit( ast::EnumDecl const * decl );
    3230        ast::FunctionDecl const * previsit( ast::FunctionDecl const * decl );
    3331        ast::FunctionType const * previsit( ast::FunctionType const * type );
    3432};
    35 
    36 void EnumAndPointerDecayCore::previsit( ast::ParseNode const * node ) {
    37         GuardValue( location ) = &node->location;
    38 }
    3933
    4034ast::EnumDecl const * EnumAndPointerDecayCore::previsit(
     
    5044                        new ast::EnumInstType( decl, ast::CV::Const ) );
    5145        }
    52         GuardValue( location ) = &decl->location;
    5346        return mut;
    5447}
     
    7972                ast::FunctionDecl const * decl ) {
    8073        auto mut = ast::mutate( decl );
    81         GuardValue( location ) = &decl->location;
    8274        ast::ArgumentFlag isVarArgs = mut->type->isVarArgs;
    8375        // It seems fixFunction (via fixFunctionList) does the pointer decay part.
Note: See TracChangeset for help on using the changeset viewer.