Changes in src/SymTab/Validate.cc [1cbca6e:ae4c85a]
- File:
-
- 1 edited
-
src/SymTab/Validate.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Validate.cc
r1cbca6e rae4c85a 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 21:50:04 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Aug 11 16:59:35201513 // Update Count : 19 611 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Aug 05 14:00:24 2015 13 // Update Count : 195 14 14 // 15 15 … … 54 54 #include "MakeLibCfa.h" 55 55 #include "TypeEquality.h" 56 #include "ResolvExpr/typeops.h"57 56 58 57 #define debugPrint( x ) if ( doDebug ) { std::cout << x; } … … 852 851 Type * t1 = tyDecl->get_base(); 853 852 Type * t2 = typedefNames[ tyDecl->get_name() ].first->get_base(); 854 if ( ! ResolvExpr::typesCompatible( t1, t2, Indexer()) ) {853 if ( ! typeEquals( t1, t2, true ) ) { 855 854 throw SemanticError( "cannot redefine typedef: " + tyDecl->get_name() ); 856 855 } … … 895 894 DeclarationWithType *ret = Mutator::mutate( objDecl ); 896 895 typedefNames = oldNames; 897 // is the type a function?898 896 if ( FunctionType *funtype = dynamic_cast<FunctionType *>( ret->get_type() ) ) { 899 // replace the current object declaration with a function declaration900 897 return new FunctionDecl( ret->get_name(), ret->get_storageClass(), ret->get_linkage(), funtype, 0, ret->get_isInline(), ret->get_isNoreturn() ); 901 898 } else if ( objDecl->get_isInline() || objDecl->get_isNoreturn() ) {
Note:
See TracChangeset
for help on using the changeset viewer.