Ignore:
Timestamp:
Jul 23, 2018, 6:00:57 PM (6 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, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
e68b3a8
Parents:
cbdf565 (diff), c29c342 (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' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    rcbdf565 r2514607d  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun  6 16:17:18 2018
    13 // Update Count     : 843
     12// Last Modified On : Fri Jul 20 14:56:30 2018
     13// Update Count     : 850
    1414//
    1515
     
    6868        }
    6969
    70         virtual void print( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const {}
    71         virtual void printList( std::ostream &os, int indent = 0 ) const {
     70        virtual void print( __attribute__((unused)) std::ostream & os, __attribute__((unused)) int indent = 0 ) const {}
     71        virtual void printList( std::ostream & os, int indent = 0 ) const {
    7272                print( os, indent );
    7373                if ( next ) next->print( os, indent );
     
    103103        InitializerNode * next_init() const { return kids; }
    104104
    105         void print( std::ostream &os, int indent = 0 ) const;
     105        void print( std::ostream & os, int indent = 0 ) const;
    106106        void printOneLine( std::ostream & ) const;
    107107
     
    127127        ExpressionNode * set_extension( bool exten ) { extension = exten; return this; }
    128128
    129         virtual void print( std::ostream &os, __attribute__((unused)) int indent = 0 ) const override {
    130                 os << expr.get() << std::endl;
    131         }
    132         void printOneLine( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const {}
     129        virtual void print( std::ostream & os, __attribute__((unused)) int indent = 0 ) const override {
     130                os << expr.get();
     131        }
     132        void printOneLine( __attribute__((unused)) std::ostream & os, __attribute__((unused)) int indent = 0 ) const {}
    133133
    134134        template<typename T>
     
    290290        }
    291291
    292         virtual void print( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const override;
    293         virtual void printList( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const override;
     292        virtual void print( __attribute__((unused)) std::ostream & os, __attribute__((unused)) int indent = 0 ) const override;
     293        virtual void printList( __attribute__((unused)) std::ostream & os, __attribute__((unused)) int indent = 0 ) const override;
    294294
    295295        Declaration * build() const;
     
    303303        bool get_extension() const { return extension; }
    304304        DeclarationNode * set_extension( bool exten ) { extension = exten; return this; }
     305
     306        bool get_inLine() const { return inLine; }
     307        DeclarationNode * set_inLine( bool inL ) { inLine = inL; return this; }
    305308  public:
    306309        DeclarationNode * get_last() { return (DeclarationNode *)ParseNode::get_last(); }
     
    327330        StaticAssert_t assert;
    328331
    329         BuiltinType builtin;
    330 
    331         TypeData * type;
    332 
     332        BuiltinType builtin = NoBuiltinType;
     333
     334        TypeData * type = nullptr;
     335
     336        bool inLine = false;
    333337        Type::FuncSpecifiers funcSpecs;
    334338        Type::StorageClasses storageClasses;
    335339
    336         ExpressionNode * bitfieldWidth;
     340        ExpressionNode * bitfieldWidth = nullptr;
    337341        std::unique_ptr<ExpressionNode> enumeratorValue;
    338         bool hasEllipsis;
     342        bool hasEllipsis = false;
    339343        LinkageSpec::Spec linkage;
    340         Expression * asmName;
     344        Expression * asmName = nullptr;
    341345        std::list< Attribute * > attributes;
    342         InitializerNode * initializer;
     346        InitializerNode * initializer = nullptr;
    343347        bool extension = false;
    344348        std::string error;
    345         StatementNode * asmStmt;
     349        StatementNode * asmStmt = nullptr;
    346350
    347351        static UniqueName anonymous;
     
    377381        virtual StatementNode * append_last_case( StatementNode * );
    378382
    379         virtual void print( std::ostream &os, __attribute__((unused)) int indent = 0 ) const override {
     383        virtual void print( std::ostream & os, __attribute__((unused)) int indent = 0 ) const override {
    380384                os << stmt.get() << std::endl;
    381385        }
     
    435439
    436440template< typename SynTreeType, typename NodeType, template< typename, typename...> class Container, typename... Args >
    437 void buildList( const NodeType * firstNode, Container< SynTreeType *, Args... > &outputList ) {
     441void buildList( const NodeType * firstNode, Container< SynTreeType *, Args... > & outputList ) {
    438442        SemanticErrorException errors;
    439443        std::back_insert_iterator< Container< SynTreeType *, Args... > > out( outputList );
     
    449453                                assertf(false, "buildList unknown type");
    450454                        } // if
    451                 } catch( SemanticErrorException &e ) {
     455                } catch( SemanticErrorException & e ) {
    452456                        errors.append( e );
    453457                } // try
     
    460464
    461465// in DeclarationNode.cc
    462 void buildList( const DeclarationNode * firstNode, std::list< Declaration * > &outputList );
    463 void buildList( const DeclarationNode * firstNode, std::list< DeclarationWithType * > &outputList );
    464 void buildTypeList( const DeclarationNode * firstNode, std::list< Type * > &outputList );
     466void buildList( const DeclarationNode * firstNode, std::list< Declaration * > & outputList );
     467void buildList( const DeclarationNode * firstNode, std::list< DeclarationWithType * > & outputList );
     468void buildTypeList( const DeclarationNode * firstNode, std::list< Type * > & outputList );
    465469
    466470template< typename SynTreeType, typename NodeType >
    467 void buildMoveList( const NodeType * firstNode, std::list< SynTreeType * > &outputList ) {
     471void buildMoveList( const NodeType * firstNode, std::list< SynTreeType * > & outputList ) {
    468472        buildList( firstNode, outputList );
    469473        delete firstNode;
Note: See TracChangeset for help on using the changeset viewer.