Changeset caab997 for src/InitTweak
- Timestamp:
- Dec 22, 2017, 4:18:29 PM (7 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, resolv-new, with_gc
- Children:
- f64d9bc
- Parents:
- fc9153d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
rfc9153d rcaab997 564 564 void previsit( ConstantExpr * ) {} 565 565 566 void previsit( VariableExpr * varExpr ) { 567 visit_children = false; 568 569 if ( EnumInstType * inst = dynamic_cast< EnumInstType * >( varExpr->result ) ) { 570 long long int value; 571 if ( inst->baseEnum->valueOf( varExpr->var, value ) ) { 572 // enumerators are const expr 573 return; 574 } 575 } 576 isConstExpr = false; 577 } 578 566 579 bool isConstExpr = true; 567 580 };
Note: See TracChangeset
for help on using the changeset viewer.