Ignore:
Timestamp:
Apr 17, 2018, 4:24:05 PM (6 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, with_gc
Children:
27aca84
Parents:
a3323db1
Message:

Add isGenerated flag to CastExpr? to differentiate casts in source from compiler-generated casts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    ra3323db1 rc0bf94e  
    271271}
    272272
    273 CastExpr::CastExpr( Expression *arg_, Type *toType ) : Expression(), arg(arg_) {
     273CastExpr::CastExpr( Expression *arg, Type *toType, bool isGenerated ) : Expression(), arg(arg), isGenerated( isGenerated ) {
    274274        set_result(toType);
    275275}
    276276
    277 CastExpr::CastExpr( Expression *arg_ ) : Expression(), arg(arg_) {
     277CastExpr::CastExpr( Expression *arg, bool isGenerated ) : Expression(), arg(arg), isGenerated( isGenerated ) {
    278278        set_result( new VoidType( Type::Qualifiers() ) );
    279279}
    280280
    281 CastExpr::CastExpr( const CastExpr &other ) : Expression( other ), arg( maybeClone( other.arg ) ) {
     281CastExpr::CastExpr( const CastExpr &other ) : Expression( other ), arg( maybeClone( other.arg ) ), isGenerated( other.isGenerated ) {
    282282}
    283283
Note: See TracChangeset for help on using the changeset viewer.