Changes in src/SymTab/Validate.cc [843054c2:367e082]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Validate.cc
r843054c2 r367e082 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 21:50:04 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue May 19 16:50:09201513 // Update Count : 311 // Last Modified By : Rob Schluntz 12 // Last Modified On : Mon May 25 14:27:15 2015 13 // Update Count : 21 14 14 // 15 15 … … 560 560 for ( std::list< Declaration * >::const_iterator member = aggregateDecl->get_members().begin(); member != aggregateDecl->get_members().end(); ++member ) { 561 561 if ( DeclarationWithType *dwt = dynamic_cast< DeclarationWithType * >( *member ) ) { 562 // query the type qualifiers of this field and skip assigning it if it is marked const. 563 // If it is an array type, we need to strip off the array layers to find its qualifiers. 564 Type * type = dwt->get_type(); 565 while ( ArrayType * at = dynamic_cast< ArrayType * >( type ) ) { 566 type = at->get_base(); 567 } 568 569 if ( type->get_qualifiers().isConst ) { 570 // don't assign const members 571 continue; 572 } 573 562 574 if ( ArrayType *array = dynamic_cast< ArrayType * >( dwt->get_type() ) ) { 563 575 makeArrayAssignment( srcParam, dstParam, dwt, array, back_inserter( assignDecl->get_statements()->get_kids() ) );
Note: See TracChangeset
for help on using the changeset viewer.