Changeset 77bfc80


Ignore:
Timestamp:
May 17, 2019, 12:08:46 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
10a1225
Parents:
8ff178d
Message:

Fixed some warnings and better messaging for unimplemented stubs

Location:
src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/Common/SemanticError.h

    r8ff178d r77bfc80  
    1717
    1818#include "ErrorObjects.h"
     19#include "AST/Node.hpp"
    1920#include <cstring>
    2021
  • src/InitTweak/InitTweak.cc

    r8ff178d r77bfc80  
    437437                // const ast::Expr * callArg( const CallExpr * call, unsigned int pos ) {
    438438                //      if( pos >= call->args.size() ) {
    439                 //              assertf( false, "getCallArg for argument that doesn't exist: (%u); %s.", 
     439                //              assertf( false, "getCallArg for argument that doesn't exist: (%u); %s.",
    440440                //                      pos, toString( call ).c_str() );
    441441                //      }
     
    467467        }
    468468        const ast::Expr * getCallArg( const ast::Expr * call, unsigned pos ) {
    469                 assert(!"implemented; needs to build AST/Expr.cpp");
     469                (void)call;
     470                (void)pos;
     471                #warning unimplemented; needs to build AST/Expr.cpp
     472                assertf(false, "unimplemented; needs to build AST/Expr.cpp");
    470473                // if ( auto app = dynamic_cast< const ast::ApplicationExpr * >( call ) ) {
    471474                //      return callArg( app, pos );
     
    482485                //      return getCallArg( ctor->callExpr, pos );
    483486                // } else {
    484                 //      assertf( false, "Unexpected expression type passed to getCallArg: %s", 
     487                //      assertf( false, "Unexpected expression type passed to getCallArg: %s",
    485488                //              toString( call ).c_str() );
    486489                // }
     
    548551        }
    549552        const ast::Type* getPointerBase( const ast::Type* t ) {
    550                 assert(!"needs to build Type.cpp before inclusion");
     553                (void)t;
     554                #warning needs to build Type.cpp before inclusion
     555                assertf(false, "needs to build Type.cpp before inclusion");
    551556                // if ( const auto * p = dynamic_cast< const ast::PointerType * >( t ) ) {
    552557                //      return p->base;
  • src/SynTree/Declaration.cc

    r8ff178d r77bfc80  
    3131
    3232Declaration::Declaration( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage )
    33                 : name( name ), linkage( linkage ), storageClasses( scs ), uniqueId( 0 ) {
     33                : name( name ), linkage( linkage ), uniqueId( 0 ), storageClasses( scs ) {
    3434}
    3535
    3636Declaration::Declaration( const Declaration &other )
    37         : BaseSyntaxNode( other ), name( other.name ), linkage( other.linkage ), extension( other.extension ), storageClasses( other.storageClasses ), uniqueId( other.uniqueId ) {
     37        : BaseSyntaxNode( other ), name( other.name ), linkage( other.linkage ), extension( other.extension ), uniqueId( other.uniqueId ), storageClasses( other.storageClasses ) {
    3838}
    3939
  • src/Tuples/TupleExpansion.cc

    r8ff178d r77bfc80  
    320320        }
    321321        const ast::Type * makeTupleType( const std::vector<ast::ptr<ast::Expr>> & exprs ) {
    322                 assert(!"implemented; needs Type.cpp in build");
     322                (void) exprs;
     323                #warning Not implemented; needs Type.cpp in build
     324                assertf(false, "Not implemented; needs Type.cpp in build");
    323325                // // produce the TupleType which aggregates the types of the exprs
    324326                // std::vector<ast::ptr<ast::Type>> types;
    325                 // ast::CV::Qualifiers quals{ 
    326                 //      ast::CV::Const | ast::CV::Volatile | ast::CV::Restrict | ast::CV::Lvalue | 
     327                // ast::CV::Qualifiers quals{
     328                //      ast::CV::Const | ast::CV::Volatile | ast::CV::Restrict | ast::CV::Lvalue |
    327329                //      ast::CV::Atomic | ast::CV::Mutex };
    328                
     330
    329331                // for ( const ast::Expr * expr : exprs ) {
    330332                //      assert( expr->result );
  • src/Tuples/Tuples.h

    r8ff178d r77bfc80  
    2929namespace Tuples {
    3030        // TupleAssignment.cc
    31         void handleTupleAssignment( ResolvExpr::AlternativeFinder & currentFinder, UntypedExpr * assign, 
     31        void handleTupleAssignment( ResolvExpr::AlternativeFinder & currentFinder, UntypedExpr * assign,
    3232                std::vector< ResolvExpr::AlternativeFinder >& args );
    33        
     33
    3434        // TupleExpansion.cc
    3535        /// expands z.[a, b.[x, y], c] into [z.a, z.b.x, z.b.y, z.c], inserting UniqueExprs as appropriate
     
    4848        /// returns a TypeInstType if `type` is a ttype, nullptr otherwise
    4949        TypeInstType * isTtype( Type * type );
     50        const ast::TypeInstType * isTtype( const ast::Type * type );
    5051
    5152        /// returns true if the expression may contain side-effects.
Note: See TracChangeset for help on using the changeset viewer.