Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Expr.cpp

    rb91bfde r3e5dd913  
    260260}
    261261
    262 ConstantExpr * ConstantExpr::from_string( const CodeLocation & loc, const std::string & str ) {
    263         const Type * charType = new BasicType( BasicType::Char );
    264         // Adjust the length of the string for the terminator.
    265         const Expr * strSize = from_ulong( loc, str.size() + 1 );
    266         const Type * strType = new ArrayType( charType, strSize, FixedLen, StaticDim );
    267         const std::string strValue = "\"" + str + "\"";
    268         return new ConstantExpr( loc, strType, strValue, std::nullopt );
    269 }
    270 
    271262ConstantExpr * ConstantExpr::null( const CodeLocation & loc, const Type * ptrType ) {
    272263        return new ConstantExpr{
Note: See TracChangeset for help on using the changeset viewer.