Changes in src/SymTab/TypeEquality.cc [89e6ffc:30f9072]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/TypeEquality.cc
r89e6ffc r30f9072 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // TypeEquality.cc -- 7 // TypeEquality.cc -- 8 8 // 9 9 // Author : Rob Schluntz … … 13 13 // Update Count : 37 14 14 // 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"24 15 #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 25 26 26 27 namespace SymTab { 27 28 class TypeEquality : public Visitor { 28 29 public: 29 TypeEquality( Type * other, bool vlaErr ) : result( true ), other( other ), 30 TypeEquality( Type * other, bool vlaErr ) : result( true ), other( other ), 30 31 vlaErr( vlaErr ) {} 31 32 bool result; … … 71 72 handleQualifiers( basicType ); 72 73 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(); 74 75 } else { 75 76 result = false; … … 98 99 99 100 if ( vlaErr ) { 100 // useful for comparing typedef types - in this case, we 101 // useful for comparing typedef types - in this case, we 101 102 // want types to appear distinct if either is a VLA type 102 103 if ( arrayType->get_isVarLen() || at->get_isVarLen() ) { … … 146 147 147 148 // parameter types must be equivalent 148 it1 = funcType->get_parameters().begin(); 149 it1 = funcType->get_parameters().begin(); 149 150 it2 = ft->get_parameters().begin(); 150 151 for ( ; it1 != funcType->get_parameters().end(); ++it1, ++it2 ) {
Note: See TracChangeset
for help on using the changeset viewer.