Changeset 367e082 for src/SymTab
- Timestamp:
- May 25, 2015, 3:15:21 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 49205cf
- Parents:
- 53a2e97
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Validate.cc
r53a2e97 r367e082 10 10 // Created On : Sun May 17 21:50:04 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Fri May 22 15:29:16201513 // Update Count : 912 // 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 Type::Qualifiers & qualifiers = dwt->get_type()->get_qualifiers(); 563 if ( qualifiers.isConst ) { 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 ) { 564 570 // don't assign const members 565 571 continue;
Note: See TracChangeset
for help on using the changeset viewer.