Changeset 638ac26 for src/Parser/DeclarationNode.cc
- Timestamp:
- Jul 6, 2018, 2:18:34 PM (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:
- 46e480a5
- Parents:
- e3b2474 (diff), 1d386a7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
re3b2474 r638ac26 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 7 12:08:55201813 // Update Count : 10 7912 // Last Modified On : Fri Jul 6 06:56:08 2018 13 // Update Count : 1088 14 14 // 15 15 … … 522 522 523 523 static void addQualifiersToType( TypeData *&src, TypeData * dst ) { 524 if ( src->forall && dst->kind == TypeData::Function ) {525 if ( dst->forall ) {526 dst->forall->appendList( src->forall );527 } else {528 dst->forall = src->forall;529 } // if530 src->forall = nullptr;531 } // if532 524 if ( dst->base ) { 533 525 addQualifiersToType( src, dst->base ); … … 1083 1075 SemanticError( this, "invalid function specifier for " ); 1084 1076 } // if 1077 // Forall qualifier can only appear on a function/aggregate definition/declaration. 1078 // 1079 // forall int f(); // allowed 1080 // forall int g( int i ); // allowed 1081 // forall int i; // disallowed 1082 if ( type->kind != TypeData::Function && type->forall ) { 1083 SemanticError( this, "invalid type qualifier for " ); 1084 } // if 1085 1085 bool isDelete = initializer && initializer->get_isDelete(); 1086 1086 Declaration * decl = buildDecl( type, name ? *name : string( "" ), storageClasses, maybeBuild< Expression >( bitfieldWidth ), funcSpecs, linkage, asmName, isDelete ? nullptr : maybeBuild< Initializer >(initializer), attributes )->set_extension( extension );
Note: See TracChangeset
for help on using the changeset viewer.