Changeset 142cf5d for src/Parser


Ignore:
Timestamp:
Mar 21, 2017, 12:21:04 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
94a8123
Parents:
2c4bc81
Message:

change type of string literal from char[] to const char[]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ExpressionNode.cc

    r2c4bc81 r142cf5d  
    163163ConstantExpr *build_constantStr( const std::string & str ) {
    164164        // string should probably be a primitive type
    165         ArrayType *at = new ArrayType( emptyQualifiers, new BasicType( emptyQualifiers, BasicType::Char ),
     165        ArrayType *at = new ArrayType( emptyQualifiers, new BasicType( Type::Qualifiers( Type::Const ), BasicType::Char ),
    166166                                new ConstantExpr( Constant( new BasicType( emptyQualifiers, BasicType::UnsignedInt ),
    167167                                                                                        toString( str.size()+1-2 ) ) ),  // +1 for '\0' and -2 for '"'
Note: See TracChangeset for help on using the changeset viewer.