Changeset c0bf94e for src/SynTree
- Timestamp:
- Apr 17, 2018, 4:24:05 PM (6 years ago)
- 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, with_gc
- Children:
- 27aca84
- Parents:
- a3323db1
- Location:
- src/SynTree
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
ra3323db1 rc0bf94e 271 271 } 272 272 273 CastExpr::CastExpr( Expression *arg _, Type *toType ) : Expression(), arg(arg_) {273 CastExpr::CastExpr( Expression *arg, Type *toType, bool isGenerated ) : Expression(), arg(arg), isGenerated( isGenerated ) { 274 274 set_result(toType); 275 275 } 276 276 277 CastExpr::CastExpr( Expression *arg _ ) : Expression(), arg(arg_) {277 CastExpr::CastExpr( Expression *arg, bool isGenerated ) : Expression(), arg(arg), isGenerated( isGenerated ) { 278 278 set_result( new VoidType( Type::Qualifiers() ) ); 279 279 } 280 280 281 CastExpr::CastExpr( const CastExpr &other ) : Expression( other ), arg( maybeClone( other.arg ) ) {281 CastExpr::CastExpr( const CastExpr &other ) : Expression( other ), arg( maybeClone( other.arg ) ), isGenerated( other.isGenerated ) { 282 282 } 283 283 -
src/SynTree/Expression.h
ra3323db1 rc0bf94e 188 188 public: 189 189 Expression * arg; 190 191 CastExpr( Expression * arg ); 192 CastExpr( Expression * arg, Type * toType ); 190 bool isGenerated = true; // whether this cast appeared in the source program 191 192 CastExpr( Expression * arg, bool isGenerated = true ); 193 CastExpr( Expression * arg, Type * toType, bool isGenerated = true ); 193 194 CastExpr( const CastExpr & other ); 194 195 virtual ~CastExpr();
Note: See TracChangeset
for help on using the changeset viewer.