Changeset 1931bb01 for src/Validate


Ignore:
Timestamp:
Jul 12, 2022, 3:21:18 PM (22 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
b9f8274
Parents:
9c6443e
Message:

Converted 'Validate A' to the new AST. There some utility changes as well.

Location:
src/Validate
Files:
10 added
2 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/EliminateTypedef.cpp

    r9c6443e r1931bb01  
    1010// Created On       : Wed Apr 20 16:37:00 2022
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Mon Apr 25 14:26:00 2022
    13 // Update Count     : 0
     12// Last Modified On : Mon Jul 11 16:30:00 2022
     13// Update Count     : 1
    1414//
    1515
     
    2828
    2929struct EliminateTypedefCore {
     30        // Remove typedefs from inside aggregates.
    3031        ast::StructDecl const * previsit( ast::StructDecl const * decl );
    3132        ast::UnionDecl const * previsit( ast::UnionDecl const * decl );
     33        // Remove typedefs from statement lists.
    3234        ast::CompoundStmt const * previsit( ast::CompoundStmt const * stmt );
     35        // Remove typedefs from control structure initializers.
     36        ast::IfStmt const * previsit( ast::IfStmt const * stmt );
     37        ast::ForStmt const * previsit( ast::ForStmt const * stmt );
     38        ast::WhileDoStmt const * previsit( ast::WhileDoStmt const * stmt );
    3339};
    3440
     
    6369}
    6470
     71ast::IfStmt const * EliminateTypedefCore::previsit( ast::IfStmt const * stmt ) {
     72        return field_erase_if( stmt, &ast::IfStmt::inits, isTypedefStmt );
     73}
     74
     75ast::ForStmt const * EliminateTypedefCore::previsit( ast::ForStmt const * stmt ) {
     76        return field_erase_if( stmt, &ast::ForStmt::inits, isTypedefStmt );
     77}
     78
     79ast::WhileDoStmt const * EliminateTypedefCore::previsit( ast::WhileDoStmt const * stmt ) {
     80        return field_erase_if( stmt, &ast::WhileDoStmt::inits, isTypedefStmt );
     81}
     82
    6583} // namespace
    6684
  • src/Validate/module.mk

    r9c6443e r1931bb01  
    2626        Validate/EliminateTypedef.cpp \
    2727        Validate/EliminateTypedef.hpp \
     28        Validate/EnumAndPointerDecay.cpp \
     29        Validate/EnumAndPointerDecay.hpp \
    2830        Validate/FindSpecialDeclsNew.cpp \
    2931        Validate/FixQualifiedTypes.cpp \
    3032        Validate/FixQualifiedTypes.hpp \
     33        Validate/FixReturnTypes.cpp \
     34        Validate/FixReturnTypes.hpp \
    3135        Validate/ForallPointerDecay.cpp \
    3236        Validate/ForallPointerDecay.hpp \
     
    3741        Validate/HoistStruct.cpp \
    3842        Validate/HoistStruct.hpp \
     43        Validate/HoistTypeDecls.cpp \
     44        Validate/HoistTypeDecls.hpp \
    3945        Validate/InitializerLength.cpp \
    4046        Validate/InitializerLength.hpp \
     
    4450        Validate/LinkReferenceToTypes.hpp \
    4551        Validate/NoIdSymbolTable.hpp \
     52        Validate/ReplaceTypedef.cpp \
     53        Validate/ReplaceTypedef.hpp \
    4654        Validate/ReturnCheck.cpp \
    47         Validate/ReturnCheck.hpp
     55        Validate/ReturnCheck.hpp \
     56        Validate/VerifyCtorDtorAssign.cpp \
     57        Validate/VerifyCtorDtorAssign.hpp
    4858
    4959SRCDEMANGLE += $(SRC_VALIDATE)
Note: See TracChangeset for help on using the changeset viewer.