Changeset 0800284 for src/SymTab/Validate.cc
- Timestamp:
- Oct 7, 2015, 12:42:23 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 84b08d4
- Parents:
- b0be06ac (diff), f28a53a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Validate.cc
rb0be06ac r0800284 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 21:50:04 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Aug 05 14:00:24201513 // Update Count : 19 511 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Aug 11 16:59:35 2015 13 // Update Count : 196 14 14 // 15 15 … … 54 54 #include "MakeLibCfa.h" 55 55 #include "TypeEquality.h" 56 #include "ResolvExpr/typeops.h" 56 57 57 58 #define debugPrint( x ) if ( doDebug ) { std::cout << x; } … … 851 852 Type * t1 = tyDecl->get_base(); 852 853 Type * t2 = typedefNames[ tyDecl->get_name() ].first->get_base(); 853 if ( ! typeEquals( t1, t2, true) ) {854 if ( ! ResolvExpr::typesCompatible( t1, t2, Indexer() ) ) { 854 855 throw SemanticError( "cannot redefine typedef: " + tyDecl->get_name() ); 855 856 } … … 894 895 DeclarationWithType *ret = Mutator::mutate( objDecl ); 895 896 typedefNames = oldNames; 897 // is the type a function? 896 898 if ( FunctionType *funtype = dynamic_cast<FunctionType *>( ret->get_type() ) ) { 899 // replace the current object declaration with a function declaration 897 900 return new FunctionDecl( ret->get_name(), ret->get_storageClass(), ret->get_linkage(), funtype, 0, ret->get_isInline(), ret->get_isNoreturn() ); 898 901 } else if ( objDecl->get_isInline() || objDecl->get_isNoreturn() ) {
Note:
See TracChangeset
for help on using the changeset viewer.