Ignore:
Timestamp:
Jun 12, 2023, 2:45:32 PM (2 years ago)
Author:
Fangren Yu <f37yu@…>
Branches:
ast-experimental, master
Children:
62d62db
Parents:
34b4268 (diff), 251ce80 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into ast-experimental

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/ReplaceTypedef.cpp

    r34b4268 r24d6572  
    1616#include "ReplaceTypedef.hpp"
    1717
     18#include "AST/Copy.hpp"
    1819#include "AST/Pass.hpp"
    1920#include "Common/ScopedMap.h"
    2021#include "Common/UniqueName.h"
    2122#include "Common/utility.h"
    22 #include "ResolvExpr/typeops.h"
     23#include "ResolvExpr/Unify.h"
    2324
    2425namespace Validate {
     
    149150                // constant/enumerator. The effort required to fix this corner case
    150151                // likely outweighs the utility of allowing it.
    151                 if ( !ResolvExpr::typesCompatible( t0, t1, ast::SymbolTable() )
     152                if ( !ResolvExpr::typesCompatible( t0, t1 )
    152153                                || ast::Pass<VarLenChecker>::read( t0 )
    153154                                || ast::Pass<VarLenChecker>::read( t1 ) ) {
     
    186187
    187188void ReplaceTypedefCore::previsit( ast::TypeDecl const * decl ) {
    188         TypedefMap::iterator iter = typedefNames.find( decl->name );
    189         if ( iter != typedefNames.end() ) {
    190                 typedefNames.erase( iter );
    191         }
     189        typedefNames.erase( decl->name );
    192190        typedeclNames.insert( decl->name, decl );
    193191}
Note: See TracChangeset for help on using the changeset viewer.