Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/LinkageSpec.cc

    r79970ed rf2a4f6c  
    1414//
    1515
     16#include <memory>
    1617#include <string>
    1718#include <cassert>
     
    2122
    2223LinkageSpec::Spec LinkageSpec::fromString( const std::string &spec ) {
     24        std::unique_ptr<const std::string> guard(&spec);                // allocated by lexer
    2325        if ( spec == "\"Cforall\"" ) {
    2426                return Cforall;
     
    2830                throw SemanticError( "Invalid linkage specifier " + spec );
    2931        } // if
    30         delete &spec;                                                                           // allocated by lexer
    3132}
    3233
Note: See TracChangeset for help on using the changeset viewer.