Ignore:
Timestamp:
Jul 6, 2018, 2:18:34 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    re3b2474 r638ac26  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jun  7 12:08:55 2018
    13 // Update Count     : 1079
     12// Last Modified On : Fri Jul  6 06:56:08 2018
     13// Update Count     : 1088
    1414//
    1515
     
    522522
    523523static 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                 } // if
    530                 src->forall = nullptr;
    531         } // if
    532524        if ( dst->base ) {
    533525                addQualifiersToType( src, dst->base );
     
    10831075                        SemanticError( this, "invalid function specifier for " );
    10841076                } // 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
    10851085                bool isDelete = initializer && initializer->get_isDelete();
    10861086                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.