Changes in / [5e644d3e:6943a987]


Ignore:
Location:
src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/LinkageSpec.cc

    r5e644d3e r6943a987  
    1414//
    1515
    16 #include <memory>
    1716#include <string>
    1817#include <cassert>
     
    2221
    2322LinkageSpec::Spec LinkageSpec::fromString( const std::string &spec ) {
    24         std::unique_ptr<const std::string> guard(&spec);                // allocated by lexer
    2523        if ( spec == "\"Cforall\"" ) {
    2624                return Cforall;
     
    3028                throw SemanticError( "Invalid linkage specifier " + spec );
    3129        } // if
     30        delete &spec;                                                                           // allocated by lexer
    3231}
    3332
  • src/SymTab/Validate.cc

    r5e644d3e r6943a987  
    531531                        TypeDeclMap::const_iterator base = typedeclNames.find( typeInst->get_name() );
    532532                        assert( base != typedeclNames.end() );
    533                         typeInst->set_baseType( base->second );
     533                        typeInst->set_baseType( base->second->clone() );
    534534                } // if
    535535                return typeInst;
  • src/SynTree/ReferenceToType.cc

    r5e644d3e r6943a987  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ReferenceToType.cc --
     7// ReferenceToType.cc -- 
    88//
    99// Author           : Richard C. Bilson
     
    3636void ReferenceToType::print( std::ostream &os, int indent ) const {
    3737        using std::endl;
    38 
     38       
    3939        Type::print( os, indent );
    4040        os << "instance of " << typeString() << " " << name << " ";
     
    128128}
    129129
    130 TypeInstType::~TypeInstType() {
    131         // delete baseType; //This is shared and should not be deleted
    132 }
    133 
    134130void TypeInstType::set_baseType( TypeDecl *newValue ) {
    135131        baseType = newValue;
     
    141137void TypeInstType::print( std::ostream &os, int indent ) const {
    142138        using std::endl;
    143 
     139       
    144140        Type::print( os, indent );
    145141        os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " function type) ";
  • src/SynTree/Type.h

    r5e644d3e r6943a987  
    327327        TypeInstType( const Type::Qualifiers &tq, const std::string &name, bool isFtype );
    328328        TypeInstType( const TypeInstType &other ) : Parent( other ), baseType( other.baseType ), isFtype( other.isFtype ) {}
    329         ~TypeInstType();
    330329
    331330        TypeDecl *get_baseType() const { return baseType; }
Note: See TracChangeset for help on using the changeset viewer.