Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/CodeLocationTools.cpp

    r4ec9513 r3b0bc16  
    99// Author           : Andrew Beach
    1010// Created On       : Fri Dec  4 15:42:00 2020
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Mon Mar 14 15:14:00 2022
    13 // Update Count     : 4
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Tue Feb  1 09:14:39 2022
     13// Update Count     : 3
    1414//
    1515
     
    112112    macro(ForStmt, Stmt) \
    113113    macro(SwitchStmt, Stmt) \
    114     macro(CaseClause, CaseClause) \
     114    macro(CaseStmt, Stmt) \
    115115    macro(BranchStmt, Stmt) \
    116116    macro(ReturnStmt, Stmt) \
    117117    macro(ThrowStmt, Stmt) \
    118118    macro(TryStmt, Stmt) \
    119     macro(CatchClause, CatchClause) \
    120     macro(FinallyClause, FinallyClause) \
     119    macro(CatchStmt, Stmt) \
     120    macro(FinallyStmt, Stmt) \
    121121    macro(SuspendStmt, Stmt) \
    122122    macro(WaitForStmt, Stmt) \
     
    147147    macro(CommaExpr, Expr) \
    148148    macro(TypeExpr, Expr) \
    149     macro(DimensionExpr, Expr) \
    150149    macro(AsmExpr, Expr) \
    151150    macro(ImplicitCopyCtorExpr, Expr) \
     
    240239};
    241240
    242 class LocalFillCore : public ast::WithGuards {
    243         CodeLocation const * parent;
    244 public:
    245         LocalFillCore( CodeLocation const & location ) : parent( &location ) {
    246                 assert( location.isSet() );
    247         }
    248 
    249         template<typename node_t>
    250         auto previsit( node_t const * node )
    251                         -> typename std::enable_if<has_code_location<node_t>::value, node_t const *>::type {
    252                 if ( node->location.isSet() ) {
    253                         GuardValue( parent ) = &node->location;
    254                         return node;
    255                 } else {
    256                         node_t * mut = ast::mutate( node );
    257                         mut->location = *parent;
    258                         return mut;
    259                 }
    260         }
    261 };
    262 
    263241} // namespace
    264242
     
    300278        ast::Pass<FillCore>::run( unit );
    301279}
    302 
    303 ast::Node const * localFillCodeLocations(
    304                 CodeLocation const & location , ast::Node const * node ) {
    305         ast::Pass<LocalFillCore> visitor( location );
    306         return node->accept( visitor );
    307 }
Note: See TracChangeset for help on using the changeset viewer.