Changeset c36298d for src/Parser
- Timestamp:
- Jun 17, 2019, 11:01:04 AM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b4d34fa
- Parents:
- 6a1dfda
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ExpressionNode.cc
r6a1dfda rc36298d 354 354 strtype = new BasicType( Type::Qualifiers( Type::Const ), BasicType::Char ); 355 355 } // switch 356 Expression * ret = new ConstantExpr( Constant::from_string( str, strtype ) ); 356 ArrayType * at = new ArrayType( noQualifiers, strtype, 357 new ConstantExpr( Constant::from_ulong( str.size() + 1 - 2 ) ), // +1 for '\0' and -2 for '"' 358 false, false ); 359 Expression * ret = new ConstantExpr( Constant( at, str, std::nullopt ) ); 357 360 if ( units.length() != 0 ) { 358 361 ret = new UntypedExpr( new NameExpr( units ), { ret } );
Note:
See TracChangeset
for help on using the changeset viewer.