Changeset b1f2007 for src/AST


Ignore:
Timestamp:
Dec 13, 2023, 9:17:13 AM (6 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
4c2fe47
Parents:
c40157e
Message:

first attempt at simplifying SemanticError? and its usage

Location:
src/AST
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Expr.cpp

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

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

    rc40157e rb1f2007  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Thr May 25 12:31:00 2023
    13 // Update Count     : 10
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Dec 11 16:07:30 2023
     13// Update Count     : 15
    1414//
    1515
     
    156156                                } // if
    157157                        } else {
    158                                 SemanticError( formal, toString( "Attempt to provide non-type parameter: ", toString( *actualIt ).c_str(), " for type parameter " ) );
     158                                SemanticError( formal->location, "Attempt to provide non-type parameter %s for type parameter %s",
     159                                                           toString( *actualIt ).c_str(), formal->name.c_str() );
    159160                        } // if
    160161                } else {
Note: See TracChangeset for help on using the changeset viewer.