Changeset e3e16bc for src/GenPoly


Ignore:
Timestamp:
Sep 13, 2017, 2:34:55 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
982832e
Parents:
9f5ecf5
Message:

Renamed safe_dynamic_cast to strict_dynamic_cast

Location:
src/GenPoly
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    r9f5ecf5 re3e16bc  
    1515
    1616#include <algorithm>                     // for mismatch
    17 #include <cassert>                       // for assert, safe_dynamic_cast
     17#include <cassert>                       // for assert, strict_dynamic_cast
    1818#include <iostream>                      // for operator<<, stringstream
    1919#include <list>                          // for list, list<>::iterator, _Lis...
     
    12991299
    13001300                DeclarationWithType * Pass2::mutate( FunctionDecl *functionDecl ) {
    1301                         functionDecl = safe_dynamic_cast< FunctionDecl * > ( handleDecl( functionDecl ) );
     1301                        functionDecl = strict_dynamic_cast< FunctionDecl * > ( handleDecl( functionDecl ) );
    13021302                        FunctionType * ftype = functionDecl->get_functionType();
    13031303                        if ( ! ftype->get_returnVals().empty() && functionDecl->get_statements() ) {
     
    13781378                        // move polymorphic return type to parameter list
    13791379                        if ( isDynRet( funcType ) ) {
    1380                                 ObjectDecl *ret = safe_dynamic_cast< ObjectDecl* >( funcType->get_returnVals().front() );
     1380                                ObjectDecl *ret = strict_dynamic_cast< ObjectDecl* >( funcType->get_returnVals().front() );
    13811381                                ret->set_type( new PointerType( Type::Qualifiers(), ret->get_type() ) );
    13821382                                funcType->get_parameters().push_front( ret );
  • src/GenPoly/InstantiateGeneric.cc

    r9f5ecf5 re3e16bc  
    459459                        Declaration * member = *std::next( aggr->members.begin(), memberIndex );
    460460                        assertf( member->name == memberExpr->member->name, "Instantiation has different member order than the generic type. %s / %s", toString( member ).c_str(), toString( memberExpr->member ).c_str() );
    461                         DeclarationWithType * field = safe_dynamic_cast< DeclarationWithType * >( member );
     461                        DeclarationWithType * field = strict_dynamic_cast< DeclarationWithType * >( member );
    462462                        MemberExpr * ret = new MemberExpr( field, memberExpr->aggregate->clone() );
    463463                        std::swap( ret->env, memberExpr->env );
  • src/GenPoly/Lvalue.cc

    r9f5ecf5 re3e16bc  
    1414//
    1515
    16 #include <cassert>                       // for safe_dynamic_cast
     16#include <cassert>                       // for strict_dynamic_cast
    1717#include <string>                        // for string
    1818
Note: See TracChangeset for help on using the changeset viewer.