Changes in / [5e644d3e:6943a987]
- Location:
- src
- Files:
-
- 4 edited
-
Parser/LinkageSpec.cc (modified) (3 diffs)
-
SymTab/Validate.cc (modified) (1 diff)
-
SynTree/ReferenceToType.cc (modified) (4 diffs)
-
SynTree/Type.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/LinkageSpec.cc
r5e644d3e r6943a987 14 14 // 15 15 16 #include <memory>17 16 #include <string> 18 17 #include <cassert> … … 22 21 23 22 LinkageSpec::Spec LinkageSpec::fromString( const std::string &spec ) { 24 std::unique_ptr<const std::string> guard(&spec); // allocated by lexer25 23 if ( spec == "\"Cforall\"" ) { 26 24 return Cforall; … … 30 28 throw SemanticError( "Invalid linkage specifier " + spec ); 31 29 } // if 30 delete &spec; // allocated by lexer 32 31 } 33 32 -
src/SymTab/Validate.cc
r5e644d3e r6943a987 531 531 TypeDeclMap::const_iterator base = typedeclNames.find( typeInst->get_name() ); 532 532 assert( base != typedeclNames.end() ); 533 typeInst->set_baseType( base->second );533 typeInst->set_baseType( base->second->clone() ); 534 534 } // if 535 535 return typeInst; -
src/SynTree/ReferenceToType.cc
r5e644d3e r6943a987 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // ReferenceToType.cc -- 7 // ReferenceToType.cc -- 8 8 // 9 9 // Author : Richard C. Bilson … … 36 36 void ReferenceToType::print( std::ostream &os, int indent ) const { 37 37 using std::endl; 38 38 39 39 Type::print( os, indent ); 40 40 os << "instance of " << typeString() << " " << name << " "; … … 128 128 } 129 129 130 TypeInstType::~TypeInstType() {131 // delete baseType; //This is shared and should not be deleted132 }133 134 130 void TypeInstType::set_baseType( TypeDecl *newValue ) { 135 131 baseType = newValue; … … 141 137 void TypeInstType::print( std::ostream &os, int indent ) const { 142 138 using std::endl; 143 139 144 140 Type::print( os, indent ); 145 141 os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " function type) "; -
src/SynTree/Type.h
r5e644d3e r6943a987 327 327 TypeInstType( const Type::Qualifiers &tq, const std::string &name, bool isFtype ); 328 328 TypeInstType( const TypeInstType &other ) : Parent( other ), baseType( other.baseType ), isFtype( other.isFtype ) {} 329 ~TypeInstType();330 329 331 330 TypeDecl *get_baseType() const { return baseType; }
Note:
See TracChangeset
for help on using the changeset viewer.