Changeset 4c3ee8d
- Timestamp:
- Jul 3, 2018, 9:04:45 AM (6 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, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- bbe1a87
- Parents:
- 41e8217
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r41e8217 r4c3ee8d 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jun 29 10:31:42201813 // Update Count : 3 59612 // Last Modified On : Mon Jul 2 20:23:14 2018 13 // Update Count : 3607 14 14 // 15 15 … … 112 112 for ( DeclarationNode *iter = declaration; iter != nullptr; iter = (DeclarationNode *)iter->get_next() ) { 113 113 iter->set_extension( true ); 114 } // for 115 } // distExt 116 117 void distQual( DeclarationNode * declaration, DeclarationNode * qualifiers ) { 118 // distribute qualifiers across all declarations in a distribution statemement 119 for ( DeclarationNode * iter = declaration; iter != nullptr; iter = (DeclarationNode *)iter->get_next() ) { 120 if ( isMangled( iter->linkage ) ) { // ignore extern "C" 121 iter->addQualifiers( qualifiers->clone() ); 122 } // if 114 123 } // for 115 124 } // distExt … … 2377 2386 '{' up external_definition_list_opt down '}' // CFA, namespace 2378 2387 { 2379 for ( DeclarationNode * iter = $5; iter != nullptr; iter = (DeclarationNode *)iter->get_next() ) { 2380 if ( isMangled( iter->linkage ) ) { // ignore extern "C" 2381 iter->addQualifiers( $1->clone() ); 2382 } // if 2383 } // for 2388 distQual( $5, $1 ); 2384 2389 xxx = false; 2385 2390 delete $1; … … 2388 2393 | declaration_qualifier_list 2389 2394 { 2390 if ( $1->type ->qualifiers.val ) { SemanticError( yylloc, "CV qualifiers cannot be distributed; only storage-class and forall qualifiers." ); }2391 if ( $1->type ->forall ) xxx = forall = true; // remember generic type2395 if ( $1->type && $1->type->qualifiers.val ) { SemanticError( yylloc, "CV qualifiers cannot be distributed; only storage-class and forall qualifiers." ); } 2396 if ( $1->type && $1->type->forall ) xxx = forall = true; // remember generic type 2392 2397 } 2393 2398 '{' up external_definition_list_opt down '}' // CFA, namespace 2394 2399 { 2395 for ( DeclarationNode * iter = $5; iter != nullptr; iter = (DeclarationNode *)iter->get_next() ) { 2396 if ( isMangled( iter->linkage ) ) { // ignore extern "C" 2397 iter->addQualifiers( $1->clone() ); 2398 } // if 2399 } // for 2400 distQual( $5, $1 ); 2400 2401 xxx = false; 2401 2402 delete $1; … … 2409 2410 '{' up external_definition_list_opt down '}' // CFA, namespace 2410 2411 { 2411 for ( DeclarationNode * iter = $6; iter != nullptr; iter = (DeclarationNode *)iter->get_next() ) { 2412 if ( isMangled( iter->linkage ) && isMangled( $2->linkage ) ) { // ignore extern "C" 2413 iter->addQualifiers( $1->clone() ); 2414 iter->addQualifiers( $2->clone() ); 2415 } // if 2416 } // for 2412 distQual( $6, $2 ); 2413 distQual( $6, $1 ); 2417 2414 xxx = false; 2418 2415 delete $1;
Note: See TracChangeset
for help on using the changeset viewer.