Changes in src/InitTweak/FixGlobalInit.cc [ca35c51:7baed7d]
- File:
-
- 1 edited
-
src/InitTweak/FixGlobalInit.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixGlobalInit.cc
rca35c51 r7baed7d 9 9 // Author : Rob Schluntz 10 10 // Created On : Mon May 04 15:14:56 2016 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Wed Jun 29 22:33:15201613 // Update Count : 411 // Last Modified By : Rob Schluntz 12 // Last Modified On : Fri May 13 11:37:30 2016 13 // Update Count : 2 14 14 // 15 15 … … 85 85 init->accept( checker ); 86 86 return checker.isConstExpr; 87 } // if87 } 88 88 // for all intents and purposes, no initializer means const expr 89 89 return true; … … 98 98 } else { 99 99 translationUnit.push_back( fixer.initFunction ); 100 } // if 101 100 } 102 101 if ( fixer.destroyFunction->get_statements()->get_kids().empty() ) { 103 102 delete fixer.destroyFunction; 104 103 } else { 105 104 translationUnit.push_back( fixer.destroyFunction ); 106 } // if105 } 107 106 } 108 107 … … 147 146 // if ( isConstExpr( objDecl->get_init() ) ) return; 148 147 149 if ( dynamic_cast< ArrayType * > ( objDecl->get_type() ) ) {148 if ( ArrayType * at = dynamic_cast< ArrayType * > ( objDecl->get_type() ) ) { 150 149 // xxx - initialize each element of the array 151 150 } else { … … 165 164 destroy->get_args().push_back( new AddressExpr( new VariableExpr( objDecl ) ) ); 166 165 destroyStatements.push_front( new ImplicitCtorDtorStmt( new ExprStmt( noLabels, destroy ) ) ); 167 } // if166 } 168 167 } 169 168
Note:
See TracChangeset
for help on using the changeset viewer.