Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/GenericParameter.cpp

    re9e9f56 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // GenericParameter.cpp -- Generic parameter related passes.
     7// GenericParameter.hpp -- Generic parameter related passes.
    88//
    99// Author           : Andrew Beach
    1010// Created On       : Fri Mar 21 10:02:00 2022
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Tue Sep 20 16:28:00 2022
    13 // Update Count     : 2
     12// Last Modified On : Fri Apr 22 16:43:00 2022
     13// Update Count     : 1
    1414//
    1515
     
    119119}
    120120
    121 struct ValidateGenericParamsCore : public ast::WithCodeLocation {
     121struct ValidateGenericParamsCore : public ast::WithGuards {
     122        const CodeLocation * locationPtr = nullptr;
     123
     124        void previsit( const ast::ParseNode * node ) {
     125                GuardValue( locationPtr ) = &node->location;
     126        }
     127
    122128        const ast::StructInstType * previsit( const ast::StructInstType * type ) {
    123                 assert( location );
    124                 return validateGeneric( *location, type );
     129                assert( locationPtr );
     130                return validateGeneric( *locationPtr, type );
    125131        }
    126132
    127133        const ast::UnionInstType * previsit( const ast::UnionInstType * type ) {
    128                 assert( location );
    129                 return validateGeneric( *location, type );
     134                assert( locationPtr );
     135                return validateGeneric( *locationPtr, type );
    130136        }
    131137};
Note: See TracChangeset for help on using the changeset viewer.