Ignore:
Timestamp:
May 11, 2022, 11:33:21 AM (2 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
7675f58
Parents:
e6bb667
Message:

Added the new invariant checks. There seems to be a few unset locations in the multi-level exit code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ControlStruct/MultiLevelExit.cpp

    re6bb667 r3f681b1  
    1818#include "AST/Pass.hpp"
    1919#include "AST/Stmt.hpp"
     20#include "Common/CodeLocationTools.hpp"
    2021#include "LabelGeneratorNew.hpp"
    2122
     
    618619        Pass<MultiLevelExitCore> visitor( labelTable );
    619620        const CompoundStmt * ret = stmt->accept( visitor );
    620         return ret;
     621        // There are some unset code locations slipping in, possibly by Labels.
     622        const Node * node = localFillCodeLocations( ret->location, ret );
     623        return strict_dynamic_cast<const CompoundStmt *>( node );
    621624}
    622625} // namespace ControlStruct
Note: See TracChangeset for help on using the changeset viewer.