Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/TypeEquality.cc

    r89e6ffc r30f9072  
    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"
    2415#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
    2526
    2627namespace SymTab {
    2728        class TypeEquality : public Visitor {
    2829  public:
    29                 TypeEquality( Type * other, bool vlaErr ) : result( true ), other( other ), 
     30                TypeEquality( Type * other, bool vlaErr ) : result( true ), other( other ),
    3031                        vlaErr( vlaErr ) {}
    3132                bool result;
     
    7172                handleQualifiers( basicType );
    7273                if ( BasicType * bt = dynamic_cast< BasicType * >( other ) ) {
    73                         result = result && basicType->get_kind() == bt->get_kind(); 
     74                        result = result && basicType->get_kind() == bt->get_kind();
    7475                } else {
    7576                        result = false;
     
    9899
    99100                        if ( vlaErr ) {
    100                                 // useful for comparing typedef types - in this case, we 
     101                                // useful for comparing typedef types - in this case, we
    101102                                // want types to appear distinct if either is a VLA type
    102103                                if ( arrayType->get_isVarLen() || at->get_isVarLen() ) {
     
    146147
    147148                        // parameter types must be equivalent
    148                         it1 = funcType->get_parameters().begin(); 
     149                        it1 = funcType->get_parameters().begin();
    149150                        it2 = ft->get_parameters().begin();
    150151                        for ( ; it1 != funcType->get_parameters().end(); ++it1, ++it2 ) {
Note: See TracChangeset for help on using the changeset viewer.