Changes in src/SymTab/FixFunction.cc [d53772d:954ef5b]
- File:
-
- 1 edited
-
src/SymTab/FixFunction.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/FixFunction.cc
rd53772d r954ef5b 30 30 // can't delete function type because it may contain assertions, so transfer ownership to new object 31 31 ObjectDecl *pointer = new ObjectDecl( functionDecl->name, functionDecl->get_storageClasses(), functionDecl->linkage, nullptr, new PointerType( Type::Qualifiers(), functionDecl->type ), nullptr, functionDecl->attributes ); 32 pointer->location = functionDecl->location;33 32 functionDecl->attributes.clear(); 34 33 functionDecl->type = nullptr; … … 37 36 } 38 37 39 // xxx - this passes on void[], e.g.40 // void foo(void [10]);41 // does not cause an error42 43 38 Type * FixFunction::postmutate(ArrayType *arrayType) { 44 39 // need to recursively mutate the base type in order for multi-dimensional arrays to work. 45 40 PointerType *pointerType = new PointerType( arrayType->get_qualifiers(), arrayType->base, arrayType->dimension, arrayType->isVarLen, arrayType->isStatic ); 46 pointerType->location = arrayType->location;47 41 arrayType->base = nullptr; 48 42 arrayType->dimension = nullptr; … … 68 62 void FixFunction::premutate(ZeroType *) { visit_children = false; } 69 63 void FixFunction::premutate(OneType *) { visit_children = false; } 70 71 bool fixFunction( DeclarationWithType *& dwt ) {72 PassVisitor<FixFunction> fixer;73 dwt = dwt->acceptMutator( fixer );74 return fixer.pass.isVoid;75 }76 64 } // namespace SymTab 77 65
Note:
See TracChangeset
for help on using the changeset viewer.