Changes in / [b83c575:96b0e49]


Ignore:
Location:
src
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Decl.cpp

    rb83c575 r96b0e49  
    99// Author           : Aaron B. Moss
    1010// Created On       : Thu May 9 10:00:00 2019
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Dec  9 16:28:51 2023
    13 // Update Count     : 31
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Thu May  5 12:10:00 2022
     13// Update Count     : 24
    1414//
    1515
     
    113113// --- EnumDecl
    114114
    115 bool EnumDecl::valueOf( const Decl * enumerator, long long & value ) const {
     115bool EnumDecl::valueOf( const Decl * enumerator, long long& value ) const {
    116116        if ( enumValues.empty() ) {
    117117                Evaluation crntVal = {0, true, true};  // until expression is given, we know to start counting from 0
    118118                for ( const Decl * member : members ) {
    119                         const ObjectDecl * field = strict_dynamic_cast< const ObjectDecl * >( member );
     119                        const ObjectDecl* field = strict_dynamic_cast< const ObjectDecl* >( member );
    120120                        if ( field->init ) {
    121                                 const SingleInit * init = strict_dynamic_cast< const SingleInit * >( field->init.get() );
     121                                const SingleInit * init = strict_dynamic_cast< const SingleInit* >( field->init.get() );
    122122                                crntVal = eval( init->value );
    123123                                if ( ! crntVal.isEvaluableInGCC ) {
    124                                         SemanticError( init->location, "Non-constexpr in initialization of enumerator %s", field->name.c_str() );
     124                                        SemanticError( init->location, ::toString( "Non-constexpr in initialization of "
     125                                                "enumerator: ", field ) );
    125126                                }
    126127                        }
    127128                        if ( enumValues.count( field->name ) != 0 ) {
    128                                 SemanticError( location, "Enum %s has multiple members with %s", name.c_str(), field->name.c_str() );
     129                                SemanticError( location, ::toString( "Enum ", name, " has multiple members with the "   "name ", field->name ) );
    129130                        }
    130131                        if (crntVal.hasKnownValue) {
  • src/AST/Expr.cpp

    rb83c575 r96b0e49  
    99// Author           : Aaron B. Moss
    1010// Created On       : Wed May 15 17:00:00 2019
    11 // Last Modified By : Peter A. Buhr
     11// Last Modified By : Andrew Beach
    1212// Created On       : Wed May 18 13:56:00 2022
    13 // Update Count     : 12
     13// Update Count     : 8
    1414//
    1515
     
    168168                        return addrType( refType->base );
    169169                } else {
    170                         SemanticError( loc, "Attempt to take address of non-lvalue expression %s",
    171                                                    toString( arg->result.get() ).c_str() );
     170                        SemanticError( loc, arg->result.get(),
     171                                "Attempt to take address of non-lvalue expression: " );
    172172                }
    173173        }
     
    240240                return 1;
    241241        }
    242         SemanticError( this->location, "Constant expression of non-integral type %s",
    243                                    toString( this ).c_str() );
     242        SemanticError( this, "Constant expression of non-integral type " );
    244243}
    245244
  • src/AST/LinkageSpec.cpp

    rb83c575 r96b0e49  
    99// Author           : Aaron B. Moss
    1010// Created On       : Thu May 9 10:00:00 2019
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Dec 11 16:08:58 2023
    13 // Update Count     : 2
     11// Last Modified By : Aaron B. Moss
     12// Last Modified On : Thu May 9 10:00:00 2019
     13// Update Count     : 1
    1414//
    1515
     
    3737                return spec;
    3838        } else {
    39                 SemanticError( loc, "Invalid linkage specifier %s", cmd->c_str() );
     39                SemanticError( loc, "Invalid linkage specifier " + *cmd );
    4040        }
    4141}
  • src/AST/TypeSubstitution.hpp

    rb83c575 r96b0e49  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Dec 11 16:07:30 2023
    13 // Update Count     : 15
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Thr May 25 12:31:00 2023
     13// Update Count     : 10
    1414//
    1515
     
    156156                                } // if
    157157                        } else {
    158                                 SemanticError( formal->location, "Attempt to provide non-type parameter %s for type parameter %s",
    159                                                            toString( *actualIt ).c_str(), formal->name.c_str() );
     158                                SemanticError( formal, toString( "Attempt to provide non-type parameter: ", toString( *actualIt ).c_str(), " for type parameter " ) );
    160159                        } // if
    161160                } else {
  • src/Common/SemanticError.cc

    rb83c575 r96b0e49  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Dec 11 15:59:09 2023
    13 // Update Count     : 14
     12// Last Modified On : Thu Jun  7 08:05:26 2018
     13// Update Count     : 10
    1414//
    1515
     
    7070//-----------------------------------------------------------------------------
    7171// Semantic Error
    72 
    7372bool SemanticErrorThrow = false;
    7473
     
    102101                std::cerr << ErrorHelpers::bold() << err.location << ErrorHelpers::error_str() << ErrorHelpers::reset_font() << err.description << std::endl;
    103102        }
    104 }
    105 
    106 void SemanticError( CodeLocation location, const char * fmt, ... ) {
    107         char msg[2048];                                                                         // worst-case error-message buffer
    108         va_list args;
    109         va_start( args, fmt );
    110         vsnprintf( msg, sizeof(msg), fmt, args );                       // always null terminated, but may be truncated
    111         va_end( args );
    112 
    113         SemanticErrorThrow = true;
    114         throw SemanticErrorException( location, msg );          // convert msg to string
    115103}
    116104
  • src/Common/SemanticError.h

    rb83c575 r96b0e49  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Dec 11 21:54:22 2023
    13 // Update Count     : 54
     12// Last Modified On : Sat Feb 25 12:01:31 2023
     13// Update Count     : 37
    1414//
    1515
     
    1818#include "ErrorObjects.h"
    1919#include "AST/Node.hpp"
    20 #include "AST/ParseNode.hpp"
    2120#include <cstring>
    2221
     
    2625extern bool SemanticErrorThrow;
    2726
    28 __attribute__((noreturn, format(printf, 2, 3))) void SemanticError( CodeLocation location, const char fmt[], ... );
    29 
    3027__attribute__((noreturn)) void SemanticError( CodeLocation location, std::string error );
    3128
    32 __attribute__((noreturn)) static inline void SemanticError( const ast::ParseNode * obj, const std::string & error ) {
     29template< typename T >
     30__attribute__((noreturn)) static inline void SemanticError( const T * obj, const std::string & error ) {
    3331        SemanticError( obj->location, toString( error, obj ) );
    3432}
    3533
    36 __attribute__((noreturn)) static inline void SemanticError( CodeLocation location, const ast::Node * obj, const std::string & error ) {
     34template< typename T >
     35__attribute__((noreturn)) static inline void SemanticError( CodeLocation location, const T * obj, const std::string & error ) {
    3736        SemanticError( location, toString( error, obj ) );
    3837}
     
    5554
    5655constexpr WarningData WarningFormats[] = {
    57         {"self-assign"              , Severity::Warn, "self assignment of expression: %s"                          },
    58         {"reference-conversion"     , Severity::Warn, "rvalue to reference conversion of rvalue: %s"               },
    59         {"qualifiers-zero_t-one_t"  , Severity::Warn, "questionable use of type qualifier(s) with %s"              },
    60         {"aggregate-forward-decl"   , Severity::Warn, "forward declaration of nested aggregate: %s"                },
    61         {"superfluous-decl"         , Severity::Warn, "declaration does not allocate storage: %s"                  },
    62         {"superfluous-else"         , Severity::Warn, "else clause never executed for empty loop conditional"      },
    63         {"gcc-attributes"           , Severity::Warn, "invalid attribute: %s"                                      },
    64         {"c++-like-copy"            , Severity::Warn, "Constructor from reference is not a valid copy constructor" },
    65         {"depreciated-trait-syntax" , Severity::Warn, "trait type-parameters are now specified using the forall clause" },
     56        {"self-assign"              , Severity::Warn    , "self assignment of expression: %s"                          },
     57        {"reference-conversion"     , Severity::Warn    , "rvalue to reference conversion of rvalue: %s"               },
     58        {"qualifiers-zero_t-one_t"  , Severity::Warn    , "questionable use of type qualifier(s) with %s"              },
     59        {"aggregate-forward-decl"   , Severity::Warn    , "forward declaration of nested aggregate: %s"                },
     60        {"superfluous-decl"         , Severity::Warn    , "declaration does not allocate storage: %s"                  },
     61        {"superfluous-else"         , Severity::Warn    , "else clause never executed for empty loop conditional"      },
     62        {"gcc-attributes"           , Severity::Warn    , "invalid attribute: %s"                                      },
     63        {"c++-like-copy"            , Severity::Warn    , "Constructor from reference is not a valid copy constructor" },
     64        {"depreciated-trait-syntax" , Severity::Warn    , "trait type-parameters are now specified using the forall clause" },
    6665};
    6766
     
    7675        CppCopy,
    7776        DeprecTraitSyntax,
    78         NUMBER_OF_WARNINGS, // MUST be the last warning
     77        NUMBER_OF_WARNINGS, // This MUST be the last warning
    7978};
    8079
  • src/ControlStruct/FixLabels.cpp

    rb83c575 r96b0e49  
    1010// Created On       : Mon Nov  1 09:39:00 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Nov 26 15:06:51 2023
    13 // Update Count     : 10
     12// Last Modified On : Mon Jan 31 22:19:17 2022
     13// Update Count     : 9
    1414//
    1515
     
    4747        for ( auto kvp : labelTable ) {
    4848                if ( nullptr == kvp.second ) {
    49                         SemanticError( kvp.first.location, "Use of undefined label %s.", kvp.first.name.c_str() );
     49                        SemanticError( kvp.first.location,
     50                                                   "Use of undefined label: " + kvp.first.name );
    5051                }
    5152        }
  • src/ControlStruct/MultiLevelExit.cpp

    rb83c575 r96b0e49  
    99// Author           : Andrew Beach
    1010// Created On       : Mon Nov  1 13:48:00 2021
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Dec 11 13:44:45 2023
    13 // Update Count     : 38
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Fri Sep  8 17:04:00 2023
     13// Update Count     : 36
    1414//
    1515
     
    521521                assert(0);
    522522        }
    523         SemanticError( stmt->location, "'return' may not appear in a %s", context );
     523        SemanticError( stmt->location, toString( "'return' may not appear in a ", context ) );
    524524}
    525525
  • src/Parser/ParseNode.h

    rb83c575 r96b0e49  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 13:28:16 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Dec  9 17:39:34 2023
    13 // Update Count     : 945
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Mon Apr  3 17:55:00 2023
     13// Update Count     : 942
    1414//
    1515
     
    3737class ExpressionNode;
    3838struct StatementNode;
    39 
    4039
    4140//##############################################################################
     
    9897std::ostream & operator<<( std::ostream & out, const ParseNode * node );
    9998
    100 __attribute__((noreturn)) static inline void SemanticError( const ParseNode * obj, const std::string & error ) {
    101         SemanticError( obj->location, toString( error, obj ) );
    102 }
    103 
    10499// Local Variables: //
    105100// tab-width: 4 //
  • src/Parser/TypeData.cc

    rb83c575 r96b0e49  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 15:12:51 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Nov 26 15:51:05 2023
    13 // Update Count     : 681
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Tue Apr  4 13:39:00 2023
     13// Update Count     : 680
    1414//
    1515
     
    864864
    865865static string genTSError( string msg, DeclarationNode::BasicType basictype ) {
    866         SemanticError( yylloc, "invalid type specifier \"%s\" for type \"%s\".", msg.c_str(), DeclarationNode::basicTypeNames[basictype] );
     866        SemanticError( yylloc, string( "invalid type specifier \"" ) + msg + "\" for type \"" + DeclarationNode::basicTypeNames[basictype] + "\"." );
    867867} // genTSError
    868868
     
    15071507                } // for
    15081508                // declaration type still set => type not moved to a matching parameter so there is a missing parameter name
    1509                 if ( decl->type ) SemanticError( decl->location, "missing name in parameter list %s", decl->name->c_str() );
     1509                if ( decl->type ) SemanticError( decl->location, string( "missing name in parameter list " ) + *decl->name );
    15101510        } // for
    15111511
  • src/Parser/parser.yy

    rb83c575 r96b0e49  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Nov 26 13:18:06 2023
    13 // Update Count     : 6398
     12// Last Modified On : Tue Oct  3 17:14:12 2023
     13// Update Count     : 6396
    1414//
    1515
     
    260260                } // if
    261261        } else {
    262                 SemanticError( yylloc, "syntax error, loop-index name missing. Expression disallowed." ); return nullptr;
     262                SemanticError( yylloc, "syntax error, loop-index name missing. Expression disallowed. ." ); return nullptr;
    263263        } // if
    264264} // forCtrl
    265265
    266266static void IdentifierBeforeIdentifier( string & identifier1, string & identifier2, const char * kind ) {
    267         SemanticError( yylloc, "syntax error, adjacent identifiers \"%s\" and \"%s\" are not meaningful in an %s.\n"
    268                                    "Possible cause is misspelled type name or missing generic parameter.",
    269                                    identifier1.c_str(), identifier2.c_str(), kind );
     267        SemanticError( yylloc, ::toString( "syntax error, adjacent identifiers \"", identifier1, "\" and \"", identifier2, "\" are not meaningful in a", kind, ".\n"
     268                                   "Possible cause is misspelled type name or missing generic parameter." ) );
    270269} // IdentifierBeforeIdentifier
    271270
    272271static void IdentifierBeforeType( string & identifier, const char * kind ) {
    273         SemanticError( yylloc, "syntax error, identifier \"%s\" cannot appear before a %s.\n"
    274                                    "Possible cause is misspelled storage/CV qualifier, misspelled typename, or missing generic parameter.",
    275                                    identifier.c_str(), kind );
     272        SemanticError( yylloc, ::toString( "syntax error, identifier \"", identifier, "\" cannot appear before a ", kind, ".\n"
     273                                   "Possible cause is misspelled storage/CV qualifier, misspelled typename, or missing generic parameter." ) );
    276274} // IdentifierBeforeType
    277275
     
    691689        //      { SemanticError( yylloc, "Resume expression is currently unimplemented." ); $$ = nullptr; }
    692690        | IDENTIFIER IDENTIFIER                                                         // invalid syntax rule
    693                 { IdentifierBeforeIdentifier( *$1.str, *$2.str, "expression" ); $$ = nullptr; }
     691                { IdentifierBeforeIdentifier( *$1.str, *$2.str, "n expression" ); $$ = nullptr; }
    694692        | IDENTIFIER type_qualifier                                                     // invalid syntax rule
    695693                { IdentifierBeforeType( *$1.str, "type qualifier" ); $$ = nullptr; }
     
    11571155        | identifier_or_type_name ':' attribute_list_opt error // invalid syntax rule
    11581156                {
    1159                         SemanticError( yylloc, "syntx error, label \"%s\" must be associated with a statement, "
    1160                                                    "where a declaration, case, or default is not a statement.\n"
    1161                                                    "Move the label or terminate with a semicolon.", $1.str->c_str() );
     1157                        SemanticError( yylloc, ::toString( "syntx error, label \"", *$1.str, "\" must be associated with a statement, "
     1158                                                                                           "where a declaration, case, or default is not a statement. "
     1159                                                                                           "Move the label or terminate with a semi-colon." ) );
    11621160                        $$ = nullptr;
    11631161                }
     
    21032101        | sue_declaration_specifier invalid_types                       // invalid syntax rule
    21042102                {
    2105                         SemanticError( yylloc, "syntax error, expecting ';' at end of \"%s\" declaration.",
    2106                                                    $1->type->enumeration.name ? "enum" : ast::AggregateDecl::aggrString( $1->type->aggregate.kind ) );
     2103                        SemanticError( yylloc, ::toString( "syntax error, expecting ';' at end of ",
     2104                                $1->type->enumeration.name ? "enum" : ast::AggregateDecl::aggrString( $1->type->aggregate.kind ),
     2105                                " declaration." ) );
    21072106                        $$ = nullptr;
    21082107                }
     
    21622161type_qualifier:
    21632162        type_qualifier_name
    2164         | attribute                                                                                     // trick handles most attribute locations
     2163        | attribute                                                                                     // trick handles most atrribute locations
    21652164        ;
    21662165
     
    25862585        | type_specifier field_declaring_list_opt '}'           // invalid syntax rule
    25872586                {
    2588                         SemanticError( yylloc, "syntax error, expecting ';' at end of previous declaration." );
     2587                        SemanticError( yylloc, ::toString( "syntax error, expecting ';' at end of previous declaration." ) );
    25892588                        $$ = nullptr;
    25902589                }
  • src/ResolvExpr/CurrentObject.cc

    rb83c575 r96b0e49  
    99// Author           : Rob Schluntz
    1010// Created On       : Tue Jun 13 15:28:32 2017
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Dec  9 17:49:51 2023
    13 // Update Count     : 20
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Mon Apr 10  9:40:00 2023
     13// Update Count     : 18
    1414//
    1515
     
    181181                auto res = eval( expr );
    182182                if ( !res.hasKnownValue ) {
    183                         SemanticError( location, "Array designator must be a constant expression %s", toString( expr ).c_str() );
     183                        SemanticError( location, toString( "Array designator must be a constant expression: ", expr ) );
    184184                }
    185185                return res.knownValue;
  • src/ResolvExpr/Resolver.cc

    rb83c575 r96b0e49  
    99// Author           : Aaron B. Moss
    1010// Created On       : Sun May 17 12:17:01 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Dec  9 17:45:57 2023
    13 // Update Count     : 249
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed Apr 20 10:41:00 2022
     13// Update Count     : 248
    1414//
    1515
     
    958958                                                                ++n_mutex_param;
    959959
    960                                                                 // Check if the argument matches the parameter type in the current scope.
     960                                                                // Check if the argument matches the parameter type in the current
     961                                                                // scope
    961962                                                                // ast::ptr< ast::Type > paramType = (*param)->get_type();
    962 
    963963                                                                if (
    964964                                                                        ! unify(
  • src/Validate/FixQualifiedTypes.cpp

    rb83c575 r96b0e49  
    99// Author           : Andrew Beach
    1010// Created On       : Thr Apr 21 11:13:00 2022
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Dec 13 09:00:25 2023
    13 // Update Count     : 6
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Tue Sep 20 16:15:00 2022
     13// Update Count     : 1
    1414//
    1515
     
    4141                                auto td = symtab.globalLookupType( inst->name );
    4242                                if ( !td ) {
    43                                         SemanticError( *location, "Use of undefined global type %s.", inst->name.c_str() );
     43                                        SemanticError( *location, toString("Use of undefined global type ", inst->name) );
    4444                                }
    4545                                auto base = td->base;
     
    5050                        } else {
    5151                                // .T => T is not a type name.
    52                                 assertf( false, "unhandled global qualified child type: %s", toCString( child ) );
     52                                assertf( false, "unhandled global qualified child type: %s", toCString(child) );
    5353                        }
    5454                } else {
     
    6363                                instp = inst;
    6464                        } else {
    65                                 SemanticError( *location, "Qualified type requires an aggregate on the left, but has %s.", toCString( parent ) );
     65                                SemanticError( *location, toString("Qualified type requires an aggregate on the left, but has: ", parent) );
    6666                        }
    6767                        // TODO: Need to handle forward declarations.
     
    8181                                } else {
    8282                                        // S.T - S is not an aggregate => error.
    83                                         assertf( false, "unhandled qualified child type %s.", toCString( type ) );
     83                                        assertf( false, "unhandled qualified child type: %s", toCString(type) );
    8484                                }
    8585                        }
    8686                        // failed to find a satisfying definition of type
    87                         SemanticError( *location, "Undefined type in qualified type %s", toCString( type ) );
     87                        SemanticError( *location, toString("Undefined type in qualified type: ", type) );
    8888                }
    8989        }
  • src/Validate/ForallPointerDecay.cpp

    rb83c575 r96b0e49  
    99// Author           : Andrew Beach
    1010// Created On       : Tue Dec  7 16:15:00 2021
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Nov 26 18:49:57 2023
    13 // Update Count     : 2
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Sat Apr 23 13:10:00 2022
     13// Update Count     : 1
    1414//
    1515
     
    213213                auto type = obj->type->stripDeclarator();
    214214                if ( dynamic_cast< const ast::FunctionType * >( type ) ) return;
    215                 SemanticError( obj->location, "operator %s is not a function or function pointer.", obj->name.c_str() );
     215                SemanticError( obj->location,
     216                        toCString( "operator ", obj->name.c_str(),
     217                        " is not a function or function pointer." ) );
    216218        }
    217219};
  • src/Validate/ReplaceTypedef.cpp

    rb83c575 r96b0e49  
    99// Author           : Andrew Beach
    1010// Created On       : Tue Jun 29 14:59:00 2022
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Nov 27 08:55:06 2023
    13 // Update Count     : 3
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Tue Sep 20 17:00:00 2022
     13// Update Count     : 2
    1414//
    1515
     
    111111                        if ( !rtt ) {
    112112                                assert( location );
    113                                 SemanticError( *location, "Cannot apply type parameters to base type of %s.", type->name.c_str() );
     113                                SemanticError( *location, "Cannot apply type parameters to base type of " + type->name );
    114114                        }
    115115                        rtt->params.clear();
     
    125125                if ( base == typedeclNames.end() ) {
    126126                        assert( location );
    127                         SemanticError( *location, "Use of undefined type %s.", type->name.c_str() );
     127                        SemanticError( *location, toString( "Use of undefined type ", type->name ) );
    128128                }
    129129                return ast::mutate_field( type, &ast::TypeInstType::base, base->second );
  • src/Virtual/ExpandCasts.cc

    rb83c575 r96b0e49  
    99// Author           : Andrew Beach
    1010// Created On       : Mon Jul 24 13:59:00 2017
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Nov 27 09:28:20 2023
    13 // Update Count     : 10
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Thu Aug 11 12:06:00 2022
     13// Update Count     : 5
    1414//
    1515
     
    160160
    161161        // Helper function for throwing semantic errors.
    162         auto throwError = [&fieldName, &errorLocation, &oldDecl]( std::string const & message ) {
    163                 SemanticError( errorLocation, "While following head pointer of %s named \"%s\": %s",
    164                                            oldDecl->name.c_str(), fieldName.c_str(), message.c_str() );
     162        auto throwError = [&fieldName, &errorLocation, &oldDecl](
     163                        std::string const & message ) {
     164                std::string const & context = "While following head pointer of " +
     165                        oldDecl->name + " named '" + fieldName + "': ";
     166                SemanticError( errorLocation, context + message );
    165167        };
    166168
Note: See TracChangeset for help on using the changeset viewer.