Ignore:
Timestamp:
Nov 28, 2017, 3:04:37 PM (7 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, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
4e7a4e6
Parents:
1393df07 (diff), 8a0a64d9 (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/parser.yy

    r1393df07 rd5a52cc  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Nov 26 11:36:36 2017
    13 // Update Count     : 2969
     12// Last Modified On : Mon Nov 27 17:23:35 2017
     13// Update Count     : 2992
    1414//
    1515
     
    13641364                        $$ = $3->addQualifiers( $1 )->addQualifiers( $2 );
    13651365                }
    1366         | cfa_function_declaration pop ',' push identifier_or_type_name
    1367                 {
    1368                         typedefTable.addToEnclosingScope( *$5, TypedefTable::ID );
    1369                         $$ = $1->appendList( $1->cloneType( $5 ) );
     1366        | cfa_function_declaration pop ',' push identifier_or_type_name '(' push cfa_parameter_type_list_opt pop ')'
     1367                {
     1368                        // Append the return type at the start (left-hand-side) to each identifier in the list.
     1369                        DeclarationNode * ret = new DeclarationNode;
     1370                        ret->type = maybeClone( $1->type->base );
     1371                        $$ = $1->appendList( DeclarationNode::newFunction( $5, ret, $8, nullptr, true ) );
    13701372                }
    13711373        ;
     
    24162418                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    24172419                        typedefTable.leaveScope();
    2418                         $$ = $1->addFunctionBody( $3 );
     2420                        // Add the function body to the last identifier in the function definition list, i.e., foo3:
     2421                        //   [const double] foo1(), foo2( int ), foo3( double ) { return 3.0; }
     2422                        $1->get_last()->addFunctionBody( $3 );
     2423                        $$ = $1;
    24192424                }
    24202425        | declaration_specifier function_declarator with_clause_opt compound_statement
Note: See TracChangeset for help on using the changeset viewer.