Changes in / [6943a987:5e644d3e]
- 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
r6943a987 r5e644d3e 14 14 // 15 15 16 #include <memory> 16 17 #include <string> 17 18 #include <cassert> … … 21 22 22 23 LinkageSpec::Spec LinkageSpec::fromString( const std::string &spec ) { 24 std::unique_ptr<const std::string> guard(&spec); // allocated by lexer 23 25 if ( spec == "\"Cforall\"" ) { 24 26 return Cforall; … … 28 30 throw SemanticError( "Invalid linkage specifier " + spec ); 29 31 } // if 30 delete &spec; // allocated by lexer31 32 } 32 33 -
src/SymTab/Validate.cc
r6943a987 r5e644d3e 531 531 TypeDeclMap::const_iterator base = typedeclNames.find( typeInst->get_name() ); 532 532 assert( base != typedeclNames.end() ); 533 typeInst->set_baseType( base->second ->clone());533 typeInst->set_baseType( base->second ); 534 534 } // if 535 535 return typeInst; -
src/SynTree/ReferenceToType.cc
r6943a987 r5e644d3e 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 deleted 132 } 133 130 134 void TypeInstType::set_baseType( TypeDecl *newValue ) { 131 135 baseType = newValue; … … 137 141 void TypeInstType::print( std::ostream &os, int indent ) const { 138 142 using std::endl; 139 143 140 144 Type::print( os, indent ); 141 145 os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " function type) "; -
src/SynTree/Type.h
r6943a987 r5e644d3e 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(); 329 330 330 331 TypeDecl *get_baseType() const { return baseType; }
Note:
See TracChangeset
for help on using the changeset viewer.