Changeset de57af9


Ignore:
Timestamp:
Apr 5, 2021, 3:00:21 PM (4 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
8e85344
Parents:
b71b6df
Message:

Added some asserts in CurrentObject? that prevent segfaults for better debugging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CurrentObject.cc

    rb71b6df rde57af9  
    925925                if ( auto aggr = dynamic_cast< const BaseInstType * >( type ) ) {
    926926                        if ( auto sit = dynamic_cast< const StructInstType * >( aggr ) ) {
     927                                assert( sit->base );
    927928                                return new StructIterator{ loc, sit };
    928929                        } else if ( auto uit = dynamic_cast< const UnionInstType * >( aggr ) ) {
     930                                assert( uit->base );
    929931                                return new UnionIterator{ loc, uit };
    930932                        } else {
Note: See TracChangeset for help on using the changeset viewer.