Ignore:
Timestamp:
May 24, 2019, 10:19:41 AM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
d908563
Parents:
6a9d4b4 (diff), 292642a (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 cleanup-dtors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tuples/TupleExpansion.cc

    r6a9d4b4 r933f32f  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun 21 17:35:04 2017
    13 // Update Count     : 19
     12// Last Modified On : Wed Feb 13 18:14:12 2019
     13// Update Count     : 21
    1414//
    1515
     
    1717#include <cassert>                // for assert
    1818#include <list>                   // for list
    19 
     19#include <vector>
     20
     21#include "AST/CVQualifiers.hpp"
     22#include "AST/Expr.hpp"
     23#include "AST/Node.hpp"
     24#include "AST/Type.hpp"
    2025#include "Common/PassVisitor.h"   // for PassVisitor, WithDeclsToAdd, WithGu...
    2126#include "Common/ScopedMap.h"     // for ScopedMap
     
    5863                };
    5964
    60                 struct TupleTypeReplacer : public WithDeclsToAdd, public WithGuards, public WithTypeSubstitution {
     65                struct TupleTypeReplacer : public WithDeclsToAdd, public WithGuards, public WithConstTypeSubstitution {
    6166                        Type * postmutate( TupleType * tupleType );
    6267
     
    314319                return new TupleType( qualifiers, types );
    315320        }
     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        }
    316345
    317346        TypeInstType * isTtype( Type * type ) {
Note: See TracChangeset for help on using the changeset viewer.