Changeset 284da8c for src/Parser/DeclarationNode.cc
- Timestamp:
- Jul 6, 2018, 9:45:43 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:
- a1cfa0c, ac4ebc1
- Parents:
- 57fc7d8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r57fc7d8 r284da8c 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 … … 504 504 505 505 static void addQualifiersToType( TypeData *&src, TypeData * dst ) { 506 if ( src->forall && dst->kind == TypeData::Function ) {507 if ( dst->forall ) {508 dst->forall->appendList( src->forall );509 } else {510 dst->forall = src->forall;511 } // if512 src->forall = nullptr;513 } // if514 506 if ( dst->base ) { 515 507 addQualifiersToType( src, dst->base ); … … 1065 1057 SemanticError( this, "invalid function specifier for " ); 1066 1058 } // if 1059 // Forall qualifier can only appear on a function/aggregate definition/declaration. 1060 // 1061 // forall int f(); // allowed 1062 // forall int g( int i ); // allowed 1063 // forall int i; // disallowed 1064 if ( type->kind != TypeData::Function && type->forall ) { 1065 SemanticError( this, "invalid type qualifier for " ); 1066 } // if 1067 1067 bool isDelete = initializer && initializer->get_isDelete(); 1068 1068 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.