Changes in / [02d62bb:acb89ed]


Ignore:
Location:
src
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r02d62bb racb89ed  
    1313// Update Count     : 485
    1414//
    15 #include "CodeGenerator.h"
    1615
    1716#include <cassert>                   // for assert, assertf
    1817#include <list>                      // for _List_iterator, list, list<>::it...
    1918
     19#include "CodeGenerator.h"
    2020#include "Common/SemanticError.h"    // for SemanticError
    2121#include "Common/UniqueName.h"       // for UniqueName
  • src/CodeGen/GenType.cc

    r02d62bb racb89ed  
    1313// Update Count     : 22
    1414//
    15 #include "GenType.h"
    1615
    1716#include <cassert>                // for assert, assertf
     
    2019
    2120#include "CodeGenerator.h"        // for CodeGenerator
     21#include "GenType.h"
    2222#include "SynTree/Declaration.h"  // for DeclarationWithType
    2323#include "SynTree/Expression.h"   // for Expression
  • src/CodeGen/Generate.cc

    r02d62bb racb89ed  
    1313// Update Count     : 6
    1414//
    15 #include "Generate.h"
    1615
    1716#include <iostream>                  // for ostream, endl, operator<<
     
    2120#include "CodeGenerator.h"           // for CodeGenerator, doSemicolon, oper...
    2221#include "GenType.h"                 // for genPrettyType
     22#include "Generate.h"
    2323#include "Parser/LinkageSpec.h"      // for isBuiltin, isGeneratable
    2424#include "SynTree/BaseSyntaxNode.h"  // for BaseSyntaxNode
  • src/CodeTools/TrackLoc.cc

    r02d62bb racb89ed  
    1616#include "TrackLoc.h"
    1717
    18 #include <cstdlib>                   // for exit, EXIT_FAILURE
    19 #include <iostream>                  // for operator<<, ostream, basic_ostream
    20 #include <stack>                     // for stack
    21 #include <string>                    // for operator<<, string
    22 #include <typeindex>                 // for type_index
     18#include <cstdlib>                    // for size_t, exit, EXIT_FAILURE
     19#include <iostream>                   // for operator<<, ostream, basic_ostream
     20#include <iterator>                   // for back_inserter, inserter
     21#include <stack>                      // for stack
     22#include <string>                     // for operator<<, string
     23#include <typeindex>                  // for type_index
    2324
    24 #include "Common/PassVisitor.h"      // for PassVisitor
    25 #include "Common/utility.h"          // for CodeLocation
    26 #include "SynTree/BaseSyntaxNode.h"  // for BaseSyntaxNode
     25#include "Common/PassVisitor.h"       // for PassVisitor
     26#include "Common/PassVisitor.impl.h"  // for acceptAll
     27#include "Common/SemanticError.h"     // for SemanticError
     28#include "Common/utility.h"           // for CodeLocation
     29#include "SynTree/BaseSyntaxNode.h"   // for BaseSyntaxNode
     30#include "SynTree/Mutator.h"          // for mutateAll
     31#include "SynTree/Visitor.h"          // for acceptAll
    2732
    2833class Declaration;
     
    4146                std::stack< CodeLocation * > parents;
    4247        public:
    43                 LocationPrinter(size_t printLevel) :
     48                LocationPrinter(size_t printLevel) : 
    4449                        printLevel(printLevel), lastNode(nullptr)
    4550                {}
     
    6065                                if ( !parents.empty() ) {
    6166                                        node->location = *parents.top();
    62                                 }
     67                                } 
    6368                                else if (nullptr != lastNode) {
    6469                                        node->location = *lastNode;
    65                                 }
     70                                } 
    6671                                else {
    6772                                        std::cerr << "Top level node has no CodeLocation " << name << std::endl;
  • src/Common/PassVisitor.impl.h

    r02d62bb racb89ed  
    11#pragma once
    2 // IWYU pragma: private, include "PassVisitor.h"
    32
    43#define VISIT_START( node )                     \
  • src/Common/PassVisitor.proto.h

    r02d62bb racb89ed  
    11#pragma once
    2 // IWYU pragma: private, include "PassVisitor.h"
    32
    43template<typename pass_type>
  • src/SymTab/AddVisit.h

    r02d62bb racb89ed  
    1414//
    1515
    16 #include "SynTree/Statement.h"
    17 
    1816namespace SymTab {
    1917        void addDecls( std::list< Declaration* > &declsToAdd, std::list< Statement* > &statements, std::list< Statement* >::iterator i );
     
    3028
    3129                        if ( stmt == stmts.end() ) break;
    32 
     30                       
    3331                        // run mutator on statement
    3432                        maybeAccept( *stmt, visitor );
     
    6159
    6260                        if ( decl == translationUnit.end() ) break;
    63 
     61                       
    6462                        // run mutator on declaration
    6563                        maybeAccept( *decl, visitor );
  • src/SymTab/Autogen.cc

    r02d62bb racb89ed  
    1313// Update Count     : 61
    1414//
     15
     16#include <list>
     17#include <iterator>
     18#include "SynTree/Visitor.h"
     19#include "SynTree/Type.h"
     20#include "SynTree/Statement.h"
     21#include "SynTree/TypeSubstitution.h"
     22#include "Common/utility.h"
     23#include "AddVisit.h"
     24#include "MakeLibCfa.h"
    1525#include "Autogen.h"
    16 
    17 #include <algorithm>               // for count_if
    18 #include <cassert>                 // for safe_dynamic_cast, assert, assertf
    19 #include <iterator>                // for back_insert_iterator, back_inserter
    20 #include <list>                    // for list, _List_iterator, list<>::iter...
    21 #include <set>                     // for set, _Rb_tree_const_iterator
    22 #include <vector>                  // for vector
    23 
    24 #include "AddVisit.h"              // for addVisit
    25 #include "Common/ScopedMap.h"      // for ScopedMap<>::const_iterator, Scope...
    26 #include "Common/utility.h"        // for cloneAll, operator+
    27 #include "GenPoly/DeclMutator.h"   // for DeclMutator
    28 #include "GenPoly/ScopedSet.h"     // for ScopedSet, ScopedSet<>::iterator
    29 #include "SymTab/Mangler.h"        // for Mangler
    30 #include "SynTree/Mutator.h"       // for maybeMutate
    31 #include "SynTree/Statement.h"     // for CompoundStmt, ReturnStmt, ExprStmt
    32 #include "SynTree/Type.h"          // for FunctionType, Type, TypeInstType
    33 #include "SynTree/Visitor.h"       // for maybeAccept, Visitor, acceptAll
    34 
    35 class Attribute;
     26#include "GenPoly/ScopedSet.h"
     27#include "Common/ScopedMap.h"
     28#include "SymTab/Mangler.h"
     29#include "GenPoly/DeclMutator.h"
    3630
    3731namespace SymTab {
     
    518512                // Make function polymorphic in same parameters as generic union, if applicable
    519513                const std::list< TypeDecl* > & typeParams = aggregateDecl->get_parameters(); // List of type variables to be placed on the generated functions
    520 
     514               
    521515                // default ctor/dtor need only first parameter
    522516                // void ?{}(T *); void ^?{}(T *);
  • src/SymTab/Autogen.h

    r02d62bb racb89ed  
    1717#define AUTOGEN_H
    1818
    19 #include <cassert>                // for assert
    20 #include <iterator>               // for back_insert_iterator, back_inserter
    21 #include <list>                   // for list
    22 #include <string>                 // for string, operator==
    23 
    24 #include "Common/UniqueName.h"    // for UniqueName
    25 #include "InitTweak/InitTweak.h"  // for InitExpander
    26 #include "Parser/LinkageSpec.h"   // for C
    27 #include "SynTree/Constant.h"     // for Constant
    28 #include "SynTree/Declaration.h"  // for ObjectDecl, Declaration (ptr only)
    29 #include "SynTree/Expression.h"   // for UntypedExpr, NameExpr, VariableExpr
    30 #include "SynTree/Initializer.h"  // for SingleInit
    31 #include "SynTree/Label.h"        // for Label, noLabels
    32 #include "SynTree/Statement.h"    // for Statement (ptr only), CompoundStmt
    33 #include "SynTree/Type.h"         // for Type, ArrayType, Type::Qualifiers
     19#include <string>
     20#include "SynTree/Statement.h"
     21#include "SynTree/Expression.h"
     22#include "SynTree/Declaration.h"
     23#include "SynTree/Initializer.h"
     24#include "InitTweak/InitTweak.h"
    3425
    3526namespace SymTab {
     
    164155                if ( isUnnamedBitfield( obj ) ) return;
    165156
    166                 bool addCast = (fname == "?{}" || fname == "^?{}") && ( !obj || ( obj && ! obj->get_bitfieldWidth() ) );
     157                bool addCast = (fname == "?{}" || fname == "^?{}") && ( !obj || ( obj && obj->get_bitfieldWidth() == NULL ) );
    167158                std::list< Statement * > stmts;
    168159                genCall( srcParam, dstParam, fname, back_inserter( stmts ), obj->get_type(), addCast, forward );
  • src/SymTab/FixFunction.cc

    r02d62bb racb89ed  
    1515
    1616#include "FixFunction.h"
    17 
    18 #include <list>                   // for list
    19 
    20 #include "Common/utility.h"       // for maybeClone
    21 #include "SynTree/Declaration.h"  // for FunctionDecl, ObjectDecl, Declarati...
    22 #include "SynTree/Type.h"         // for ArrayType, PointerType, Type, Basic...
     17#include "SynTree/Declaration.h"
     18#include "SynTree/Type.h"
     19#include "SynTree/Expression.h"
     20#include "Common/utility.h"
    2321
    2422namespace SymTab {
  • src/SymTab/FixFunction.h

    r02d62bb racb89ed  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FixFunction.h --
     7// FixFunction.h -- 
    88//
    99// Author           : Richard C. Bilson
     
    1717#define FIXFUNCTION_H
    1818
    19 #include "SynTree/Mutator.h"  // for Mutator
    20 #include "SynTree/SynTree.h"  // for Types
     19#include "SynTree/Mutator.h"
    2120
    2221namespace SymTab {
     
    4544                virtual Type* mutate(ZeroType *zeroType);
    4645                virtual Type* mutate(OneType *oneType);
    47 
     46 
    4847                bool isVoid;
    4948        };
  • src/SymTab/ImplementationType.cc

    r02d62bb racb89ed  
    1515
    1616#include "ImplementationType.h"
    17 
    18 #include <list>                   // for list, _List_iterator, list<>::iterator
    19 
    20 #include "SymTab/Indexer.h"       // for Indexer
    21 #include "SynTree/Declaration.h"  // for NamedTypeDecl
    22 #include "SynTree/Type.h"         // for TupleType, Type, ArrayType, Pointer...
    23 #include "SynTree/Visitor.h"      // for Visitor
     17#include "SynTree/Type.h"
     18#include "SynTree/Declaration.h"
     19#include "SynTree/Visitor.h"
     20#include "SymTab/Indexer.h"
     21#include "Common/utility.h"
    2422
    2523
  • src/SymTab/ImplementationType.h

    r02d62bb racb89ed  
    1717#define IMPLEMENTATIONTYPE_H
    1818
    19 class Type;
     19#include "SynTree/SynTree.h"
     20#include "SymTab/Indexer.h"
    2021
    2122namespace SymTab {
    22 class Indexer;
    23 
    2423        Type *implementationType( Type *, const SymTab::Indexer &indexer );
    2524
  • src/SymTab/Indexer.cc

    r02d62bb racb89ed  
    1616#include "Indexer.h"
    1717
    18 #include <cassert>                 // for assert, safe_dynamic_cast
    19 #include <iostream>                // for operator<<, basic_ostream, ostream
    20 #include <string>                  // for string, operator<<, operator!=
    21 #include <unordered_map>           // for operator!=, unordered_map<>::const...
    22 #include <unordered_set>           // for unordered_set
    23 #include <utility>                 // for pair, make_pair, move
    24 
    25 #include "Common/SemanticError.h"  // for SemanticError
    26 #include "Common/utility.h"        // for cloneAll
    27 #include "InitTweak/InitTweak.h"   // for isConstructor, isCopyFunction, isC...
    28 #include "Mangler.h"               // for Mangler
    29 #include "Parser/LinkageSpec.h"    // for isMangled, isOverridable, Spec
    30 #include "ResolvExpr/typeops.h"    // for typesCompatible
    31 #include "SynTree/Constant.h"      // for Constant
    32 #include "SynTree/Declaration.h"   // for DeclarationWithType, FunctionDecl
    33 #include "SynTree/Expression.h"    // for Expression, ImplicitCopyCtorExpr
    34 #include "SynTree/Initializer.h"   // for Initializer
    35 #include "SynTree/Statement.h"     // for CompoundStmt, Statement, ForStmt (...
    36 #include "SynTree/Type.h"          // for Type, StructInstType, UnionInstType
     18#include <string>
     19#include <typeinfo>
     20#include <unordered_map>
     21#include <unordered_set>
     22#include <utility>
     23#include <algorithm>
     24
     25#include "Mangler.h"
     26
     27#include "Common/utility.h"
     28
     29#include "ResolvExpr/typeops.h"
     30
     31#include "SynTree/Declaration.h"
     32#include "SynTree/Type.h"
     33#include "SynTree/Expression.h"
     34#include "SynTree/Initializer.h"
     35#include "SynTree/Statement.h"
     36
     37#include "InitTweak/InitTweak.h"
    3738
    3839#define debugPrint(x) if ( doDebug ) { std::cout << x; }
  • src/SymTab/Indexer.h

    r02d62bb racb89ed  
    1717#define INDEXER_H
    1818
    19 #include <iosfwd>             // for ostream
    20 #include <list>               // for list
    21 #include <string>             // for string
     19#include <list>
     20#include <string>
    2221
    23 #include "SynTree/Visitor.h"  // for Visitor
    24 #include "SynTree/SynTree.h"  // for AST nodes
     22#include "SynTree/Visitor.h"
    2523
    2624namespace SymTab {
     
    128126
    129127                struct Impl;
    130 
    131128                Impl *tables;         ///< Copy-on-write instance of table data structure
    132129                unsigned long scope;  ///< Scope index of this pointer
  • src/SymTab/Mangler.cc

    r02d62bb racb89ed  
    1313// Update Count     : 21
    1414//
     15
     16#include <cassert>
     17#include <string>
     18#include <algorithm>
     19#include <iterator>
     20#include <functional>
     21#include <set>
     22
     23#include "SynTree/Declaration.h"
     24#include "SynTree/Type.h"
     25#include "SynTree/Expression.h"
     26#include "SynTree/Initializer.h"
     27#include "SynTree/Statement.h"
    1528#include "Mangler.h"
    16 
    17 #include <algorithm>                // for copy, transform
    18 #include <cassert>                  // for assert, assertf
    19 #include <functional>               // for const_mem_fun_t, mem_fun
    20 #include <iterator>                 // for ostream_iterator, back_insert_ite...
    21 #include <list>                     // for _List_iterator, list, _List_const...
    22 #include <string>                   // for string, operator<<, basic_string
    23 
    24 #include "CodeGen/OperatorTable.h"  // for OperatorInfo, operatorLookup
    25 #include "Common/utility.h"         // for toString
    26 #include "Parser/LinkageSpec.h"     // for Spec, isOverridable, AutoGen, Int...
    27 #include "SynTree/Declaration.h"    // for TypeDecl, DeclarationWithType
    28 #include "SynTree/Expression.h"     // for TypeExpr, Expression, operator<<
    29 #include "SynTree/Type.h"           // for Type, ReferenceToType, Type::Fora...
     29#include "CodeGen/OperatorTable.h"
    3030
    3131namespace SymTab {
  • src/SymTab/Mangler.h

    r02d62bb racb89ed  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Mangler.h --
     7// Mangler.h -- 
    88//
    99// Author           : Richard C. Bilson
     
    1717#define MANGLER_H
    1818
    19 #include <map>                // for map, map<>::value_compare
    20 #include <sstream>            // for ostringstream
    21 #include <string>             // for string
    22 #include <utility>            // for pair
    23 
    24 #include "SynTree/SynTree.h"  // for Types
    25 #include "SynTree/Visitor.h"  // for Visitor, maybeAccept
     19#include <sstream>
     20#include "SynTree/SynTree.h"
     21#include "SynTree/Visitor.h"
    2622
    2723namespace SymTab {
     
    5248                virtual void visit( ZeroType *zeroType );
    5349                virtual void visit( OneType *oneType );
    54 
     50 
    5551                std::string get_mangleName() { return mangleName.str(); }
    5652          private:
     
    6258                bool mangleOverridable;         ///< Specially mangle overridable built-in methods
    6359                bool typeMode;                  ///< Produce a unique mangled name for a type
    64 
     60 
    6561                Mangler( bool mangleOverridable, bool typeMode );
    6662                Mangler( const Mangler & );
    67 
     63 
    6864                void mangleDecl( DeclarationWithType *declaration );
    6965                void mangleRef( ReferenceToType *refType, std::string prefix );
    7066                void mangleGenericRef( ReferenceToType *refType, std::string prefix );
    71 
     67 
    7268                void printQualifiers( Type *type );
    7369        }; // Mangler
  • src/SymTab/TypeEquality.cc

    r02d62bb racb89ed  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // TypeEquality.cc --
     7// TypeEquality.cc -- 
    88//
    99// Author           : Rob Schluntz
     
    1313// Update Count     : 37
    1414//
     15
     16#include <list>
     17#include <iterator>
     18#include "Validate.h"
     19#include "SynTree/Visitor.h"
     20#include "SynTree/Type.h"
     21#include "SynTree/Statement.h"
     22#include "SynTree/TypeSubstitution.h"
     23#include "Indexer.h"
    1524#include "TypeEquality.h"
    16 
    17 #include <cassert>                // for assert
    18 #include <list>                   // for list, list<>::iterator, _List_iterator
    19 #include <string>                 // for operator==, string, basic_string
    20 
    21 #include "SynTree/Constant.h"     // for Constant
    22 #include "SynTree/Declaration.h"  // for DeclarationWithType
    23 #include "SynTree/Expression.h"   // for ConstantExpr, Expression
    24 #include "SynTree/Type.h"         // for Type, ArrayType, FunctionType, Enum...
    25 #include "SynTree/Visitor.h"      // for Visitor
    2625
    2726namespace SymTab {
    2827        class TypeEquality : public Visitor {
    2928  public:
    30                 TypeEquality( Type * other, bool vlaErr ) : result( true ), other( other ),
     29                TypeEquality( Type * other, bool vlaErr ) : result( true ), other( other ), 
    3130                        vlaErr( vlaErr ) {}
    3231                bool result;
     
    7271                handleQualifiers( basicType );
    7372                if ( BasicType * bt = dynamic_cast< BasicType * >( other ) ) {
    74                         result = result && basicType->get_kind() == bt->get_kind();
     73                        result = result && basicType->get_kind() == bt->get_kind(); 
    7574                } else {
    7675                        result = false;
     
    9998
    10099                        if ( vlaErr ) {
    101                                 // useful for comparing typedef types - in this case, we
     100                                // useful for comparing typedef types - in this case, we 
    102101                                // want types to appear distinct if either is a VLA type
    103102                                if ( arrayType->get_isVarLen() || at->get_isVarLen() ) {
     
    147146
    148147                        // parameter types must be equivalent
    149                         it1 = funcType->get_parameters().begin();
     148                        it1 = funcType->get_parameters().begin(); 
    150149                        it2 = ft->get_parameters().begin();
    151150                        for ( ; it1 != funcType->get_parameters().end(); ++it1, ++it2 ) {
  • src/SymTab/TypeEquality.h

    r02d62bb racb89ed  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // TypeEquality.h --
     7// TypeEquality.h -- 
    88//
    99// Author           : Rob Schluntz
     
    1414//
    1515
    16 class Type;
    17 
    1816namespace SymTab {
    1917  // compare types t1 and t2 for equality
    20   // if vlaErr is true, then if at least one of the types is a
    21   // variable-length array type, then the result will be false
     18  // if vlaErr is true, then if at least one of the types is a 
     19  // variable-length array type, then the result will be false 
    2220  bool typeEquals( Type * t1, Type * t2, bool vlaErr = false );
    2321} // namespace SymTab
  • src/SymTab/Validate.cc

    r02d62bb racb89ed  
    3838//   definition occurs later in the input.
    3939
     40#include <algorithm>
     41#include <iterator>
     42#include <list>
     43
     44#include "CodeGen/CodeGenerator.h"
     45
     46#include "Common/PassVisitor.h"
     47#include "Common/ScopedMap.h"
     48#include "Common/UniqueName.h"
     49#include "Common/utility.h"
     50
     51#include "Concurrency/Keywords.h"
     52
     53#include "GenPoly/DeclMutator.h"
     54
     55#include "InitTweak/InitTweak.h"
     56
     57#include "AddVisit.h"
     58#include "Autogen.h"
     59#include "FixFunction.h"
     60// #include "ImplementationType.h"
     61#include "Indexer.h"
     62#include "MakeLibCfa.h"
     63#include "TypeEquality.h"
    4064#include "Validate.h"
    4165
    42 #include <cstddef>                     // for size_t
    43 #include <algorithm>                   // for move, transform
    44 #include <cassert>                     // for safe_dynamic_cast, assertf
    45 #include <iterator>                    // for back_inserter, inserter, back_...
    46 #include <list>                        // for list, _List_iterator, list<>::...
    47 #include <map>                         // for _Rb_tree_iterator, map, map<>:...
    48 #include <memory>                      // for unique_ptr, allocator
    49 #include <string>                      // for string, operator+, operator==
    50 #include <tuple>                       // for get
    51 #include <utility>                     // for pair, make_pair
    52 
    53 #include "AddVisit.h"                  // for addVisit
    54 #include "Autogen.h"                   // for SizeType, autogenerateRoutines
    55 #include "CodeGen/CodeGenerator.h"     // for genName
    56 #include "Common/PassVisitor.h"        // for PassVisitor, WithDeclsToAdd
    57 #include "Common/ScopedMap.h"          // for ScopedMap<>::const_iterator
    58 #include "Common/SemanticError.h"      // for SemanticError
    59 #include "Common/UniqueName.h"         // for UniqueName
    60 #include "Common/utility.h"            // for operator+, cloneAll, deleteAll
    61 #include "Concurrency/Keywords.h"      // for applyKeywords, implementMutexF...
    62 #include "FixFunction.h"               // for FixFunction
    63 #include "Indexer.h"                   // for Indexer
    64 #include "InitTweak/InitTweak.h"       // for isCtorDtor, isCtorDtorAssign
    65 #include "Parser/LinkageSpec.h"        // for C, Cforall
    66 #include "ResolvExpr/typeops.h"        // for extractResultType, typesCompat...
    67 #include "SynTree/Attribute.h"         // for Attribute
    68 #include "SynTree/Constant.h"          // for Constant
    69 #include "SynTree/Declaration.h"       // for EnumDecl, StructDecl, UnionDecl
    70 #include "SynTree/Expression.h"        // for TypeExpr, CompoundLiteralExpr
    71 #include "SynTree/Initializer.h"       // for ListInit, Initializer, noDesig...
    72 #include "SynTree/Mutator.h"           // for mutateAll, Mutator
    73 #include "SynTree/Statement.h"         // for CompoundStmt, DeclStmt, Return...
    74 #include "SynTree/Type.h"              // for Type, TypeInstType, TraitInstType
    75 #include "SynTree/TypeSubstitution.h"  // for TypeSubstitution, applySubstit...
    76 #include "SynTree/Visitor.h"           // for acceptAll, Visitor
     66#include "ResolvExpr/typeops.h"
     67
     68#include "SynTree/Attribute.h"
     69#include "SynTree/Expression.h"
     70#include "SynTree/Mutator.h"
     71#include "SynTree/Statement.h"
     72#include "SynTree/Type.h"
     73#include "SynTree/TypeSubstitution.h"
     74#include "SynTree/Visitor.h"
    7775
    7876#define debugPrint( x ) if ( doDebug ) { std::cout << x; }
     
    607605                // a return statement in a void-returning function in C. The expression is treated as if it
    608606                // were cast to void.
    609                 if ( ! returnStmt->get_expr() && returnVals.size() != 0 ) {
     607                if ( returnStmt->get_expr() == NULL && returnVals.size() != 0 ) {
    610608                        throw SemanticError( "Non-void function returns no values: " , returnStmt );
    611609                }
     
    838836        void validateGeneric( Aggr * inst ) {
    839837                std::list< TypeDecl * > * params = inst->get_baseParameters();
    840                 if ( params ) {
     838                if ( params != NULL ) {
    841839                        std::list< Expression * > & args = inst->get_parameters();
    842840
     
    939937        void ArrayLength::previsit( ObjectDecl * objDecl ) {
    940938                if ( ArrayType * at = dynamic_cast< ArrayType * >( objDecl->get_type() ) ) {
    941                         if ( at->get_dimension() ) return;
     939                        if ( at->get_dimension() != nullptr ) return;
    942940                        if ( ListInit * init = dynamic_cast< ListInit * >( objDecl->get_init() ) ) {
    943941                                at->set_dimension( new ConstantExpr( Constant::from_ulong( init->get_initializers().size() ) ) );
  • src/SymTab/Validate.h

    r02d62bb racb89ed  
    1818#define VALIDATE_H
    1919
    20 #include <list>  // for list
    21 
    22 class Declaration;
    23 class Type;
     20#include "SynTree/SynTree.h"
    2421
    2522namespace SymTab {
Note: See TracChangeset for help on using the changeset viewer.