Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tuples/TupleExpansion.cc

    r77bfc80 raee472e  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Feb 13 18:14:12 2019
    13 // Update Count     : 21
     12// Last Modified On : Wed Jun 21 17:35:04 2017
     13// Update Count     : 19
    1414//
    1515
     
    1717#include <cassert>                // for assert
    1818#include <list>                   // for list
    19 #include <vector>
    20 
    21 #include "AST/CVQualifiers.hpp"
    22 #include "AST/Expr.hpp"
    23 #include "AST/Node.hpp"
    24 #include "AST/Type.hpp"
     19
    2520#include "Common/PassVisitor.h"   // for PassVisitor, WithDeclsToAdd, WithGu...
    2621#include "Common/ScopedMap.h"     // for ScopedMap
     
    6358                };
    6459
    65                 struct TupleTypeReplacer : public WithDeclsToAdd, public WithGuards, public WithConstTypeSubstitution {
     60                struct TupleTypeReplacer : public WithDeclsToAdd, public WithGuards, public WithTypeSubstitution {
    6661                        Type * postmutate( TupleType * tupleType );
    6762
     
    319314                return new TupleType( qualifiers, types );
    320315        }
    321         const ast::Type * makeTupleType( const std::vector<ast::ptr<ast::Expr>> & exprs ) {
    322                 (void) exprs;
    323                 #warning Not implemented; needs Type.cpp in build
    324                 assertf(false, "Not implemented; needs Type.cpp in build");
    325                 // // produce the TupleType which aggregates the types of the exprs
    326                 // std::vector<ast::ptr<ast::Type>> types;
    327                 // ast::CV::Qualifiers quals{
    328                 //      ast::CV::Const | ast::CV::Volatile | ast::CV::Restrict | ast::CV::Lvalue |
    329                 //      ast::CV::Atomic | ast::CV::Mutex };
    330 
    331                 // for ( const ast::Expr * expr : exprs ) {
    332                 //      assert( expr->result );
    333                 //      // if the type of any expr is void, the type of the entire tuple is void
    334                 //      if ( expr->result->isVoid() ) return new ast::VoidType{};
    335 
    336                 //      // qualifiers on the tuple type are the qualifiers that exist on all components
    337                 //      quals &= expr->result->qualifiers;
    338 
    339                 //      types.emplace_back( expr->result );
    340                 // }
    341 
    342                 // if ( exprs.empty() ) { quals = ast::CV::Qualifiers{}; }
    343                 // return new ast::TupleType{ std::move(types), quals };
    344         }
    345316
    346317        TypeInstType * isTtype( Type * type ) {
Note: See TracChangeset for help on using the changeset viewer.