Changeset 26ef3b2 for src


Ignore:
Timestamp:
Jul 13, 2018, 6:33:05 PM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
dffaeac
Parents:
8f91c9ae
Message:

fix bug or-ing flags for typedef/typegen

Location:
src/Parser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/TypedefTable.cc

    r8f91c9ae r26ef3b2  
    1010// Created On       : Sat May 16 15:20:13 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jul 11 11:47:47 2018
    13 // Update Count     : 255
     12// Last Modified On : Thu Jul 12 16:16:24 2018
     13// Update Count     : 256
    1414//
    1515
     
    100100void TypedefTable::up( bool forall ) {
    101101        level += 1;
    102         kindTable.getNote( kindTable.currentScope() ) = (Note){ level, forall | getEnclForall() };
     102        kindTable.getNote( kindTable.currentScope() ) = (Note){ level, forall || getEnclForall() };
    103103        debugPrint( cerr << "Up " << " level " << level << " note " << kindTable.getNote( level ).level << ", " << kindTable.getNote( level ).forall << endl; );
    104104} // TypedefTable::up
  • src/Parser/parser.yy

    r8f91c9ae r26ef3b2  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul 12 13:47:44 2018
    13 // Update Count     : 3755
     12// Last Modified On : Thu Jul 12 16:16:25 2018
     13// Update Count     : 3756
    1414//
    1515
     
    18661866        | aggregate_key attribute_list_opt no_attr_identifier fred
    18671867                {
    1868                         typedefTable.makeTypedef( *$3, forall | typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname ); // create typedef
     1868                        typedefTable.makeTypedef( *$3, forall || typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname ); // create typedef
    18691869                        forall = false;                                                         // reset
    18701870                }
     
    18741874                {
    18751875                        // for type_name can be a qualified type name S.T, in which case only the last name in the chain needs a typedef (other names in the chain should already have one)
    1876                         typedefTable.makeTypedef( *$3->type->leafName(), forall | typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname ); // create typedef
     1876                        typedefTable.makeTypedef( *$3->type->leafName(), forall || typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname ); // create typedef
    18771877                        forall = false;                                                         // reset
    18781878                }
     
    18921892        aggregate_key attribute_list_opt no_attr_identifier fred
    18931893                {
    1894                         typedefTable.makeTypedef( *$3, forall | typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname );
     1894                        typedefTable.makeTypedef( *$3, forall || typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname );
    18951895                        forall = false;                                                         // reset
    18961896                        $$ = DeclarationNode::newAggregate( $1, $3, nullptr, nullptr, false )->addQualifiers( $2 );
Note: See TracChangeset for help on using the changeset viewer.