Changes in src/SymTab/TypeEquality.cc [30f9072:89e6ffc]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/TypeEquality.cc
r30f9072 r89e6ffc 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" 15 24 #include "TypeEquality.h" 16 17 #include <cassert> // for assert18 #include <list> // for list, list<>::iterator, _List_iterator19 #include <string> // for operator==, string, basic_string20 21 #include "SynTree/Constant.h" // for Constant22 #include "SynTree/Declaration.h" // for DeclarationWithType23 #include "SynTree/Expression.h" // for ConstantExpr, Expression24 #include "SynTree/Type.h" // for Type, ArrayType, FunctionType, Enum...25 #include "SynTree/Visitor.h" // for Visitor26 25 27 26 namespace SymTab { 28 27 class TypeEquality : public Visitor { 29 28 public: 30 TypeEquality( Type * other, bool vlaErr ) : result( true ), other( other ), 29 TypeEquality( Type * other, bool vlaErr ) : result( true ), other( other ), 31 30 vlaErr( vlaErr ) {} 32 31 bool result; … … 72 71 handleQualifiers( basicType ); 73 72 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(); 75 74 } else { 76 75 result = false; … … 99 98 100 99 if ( vlaErr ) { 101 // useful for comparing typedef types - in this case, we 100 // useful for comparing typedef types - in this case, we 102 101 // want types to appear distinct if either is a VLA type 103 102 if ( arrayType->get_isVarLen() || at->get_isVarLen() ) { … … 147 146 148 147 // parameter types must be equivalent 149 it1 = funcType->get_parameters().begin(); 148 it1 = funcType->get_parameters().begin(); 150 149 it2 = ft->get_parameters().begin(); 151 150 for ( ; it1 != funcType->get_parameters().end(); ++it1, ++it2 ) {
Note: See TracChangeset
for help on using the changeset viewer.