Changeset d53772d


Ignore:
Timestamp:
Jul 12, 2018, 12:01:31 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
04cccaf
Parents:
3007c0b
Message:

Transfer location from function to object in FixFunction? [fixes #98]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/FixFunction.cc

    r3007c0b rd53772d  
    3030                // can't delete function type because it may contain assertions, so transfer ownership to new object
    3131                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;
    3233                functionDecl->attributes.clear();
    3334                functionDecl->type = nullptr;
     
    4344                // need to recursively mutate the base type in order for multi-dimensional arrays to work.
    4445                PointerType *pointerType = new PointerType( arrayType->get_qualifiers(), arrayType->base, arrayType->dimension, arrayType->isVarLen, arrayType->isStatic );
     46                pointerType->location = arrayType->location;
    4547                arrayType->base = nullptr;
    4648                arrayType->dimension = nullptr;
Note: See TracChangeset for help on using the changeset viewer.