Changeset 18e683b for src/ResolvExpr


Ignore:
Timestamp:
Jun 24, 2019, 11:11:59 AM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
c1ea11b
Parents:
8d61d620
Message:

Port LinkReferenceToTypes? pass

Location:
src/ResolvExpr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CandidateFinder.cpp

    r8d61d620 r18e683b  
    10031003                        assert( toType );
    10041004                        toType = resolveTypeof( toType, symtab );
    1005                         toType = SymTab::validateType( toType, symtab );
     1005                        toType = SymTab::validateType( castExpr->location, toType, symtab );
    10061006                        toType = adjustExprType( toType, tenv, symtab );
    10071007
     
    14101410                                // calculate target type
    14111411                                const ast::Type * toType = resolveTypeof( initAlt.type, symtab );
    1412                                 toType = SymTab::validateType( toType, symtab );
     1412                                toType = SymTab::validateType( initExpr->location, toType, symtab );
    14131413                                toType = adjustExprType( toType, tenv, symtab );
    14141414                                // The call to find must occur inside this loop, otherwise polymorphic return
  • src/ResolvExpr/Resolver.cc

    r8d61d620 r18e683b  
    11541154                        return findKindExpression( untyped, symtab );
    11551155                }
    1156 
    1157                 /// Resolve `untyped` to the single expression whose candidate is the best match for the
    1158                 /// given type.
     1156        } // anonymous namespace
     1157
    11591158                ast::ptr< ast::Expr > findSingleExpression(
    11601159                        const ast::Expr * untyped, const ast::Type * type, const ast::SymbolTable & symtab
     
    11671166                }
    11681167
     1168        namespace {
    11691169                /// Predicate for "Candidate has integral type"
    11701170                bool hasIntegralType( const Candidate & i ) {
  • src/ResolvExpr/Resolver.h

    r8d61d620 r18e683b  
    3535        class StmtExpr;
    3636        class SymbolTable;
     37        class Type;
    3738        class TypeEnvironment;
    3839} // namespace ast
     
    6162        ast::ptr< ast::Expr > resolveInVoidContext(
    6263                const ast::Expr * expr, const ast::SymbolTable & symtab, ast::TypeEnvironment & env );
     64        /// Resolve `untyped` to the single expression whose candidate is the best match for the
     65        /// given type.
     66        ast::ptr< ast::Expr > findSingleExpression(
     67                const ast::Expr * untyped, const ast::Type * type, const ast::SymbolTable & symtab );
    6368        /// Resolves a constructor init expression
    6469        ast::ptr< ast::Init > resolveCtorInit(
Note: See TracChangeset for help on using the changeset viewer.