Ignore:
Timestamp:
Oct 30, 2023, 11:50:27 AM (8 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
36e6f10
Parents:
0b5e780
Message:

I don't actually know if this fixes anything, but the old version was definitely not doing anything and this is should have the same behaviour as the old one, and run just a bit faster.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/InitTweak.cc

    r0b5e780 r3c714ad  
    107107                };
    108108
    109                 struct InitDepthChecker_new : public ast::WithGuards {
     109                struct InitDepthChecker_new {
    110110                        bool result = true;
    111111                        const ast::Type * type;
     
    119119                                maxDepth++;
    120120                        }
    121                         void previsit( ListInit * ) {
     121                        void previsit( ast::ListInit const * ) {
    122122                                curDepth++;
    123                                 GuardAction( [this]() { curDepth--; } );
    124123                                if ( curDepth > maxDepth ) result = false;
     124                        }
     125                        void postvisit( ast::ListInit const * ) {
     126                                curDepth--;
    125127                        }
    126128                };
Note: See TracChangeset for help on using the changeset viewer.