Ignore:
Timestamp:
Jul 19, 2018, 10:30:56 AM (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:
679a260
Parents:
2f84692
Message:

extend plan 9, anonymous declarations, change token for default argument

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    r2f84692 r679e644  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul  6 06:56:08 2018
    13 // Update Count     : 1088
     12// Last Modified On : Wed Jul 18 22:50:27 2018
     13// Update Count     : 1096
    1414//
    1515
     
    5656                builtin( NoBuiltinType ),
    5757                type( nullptr ),
     58                inLine( false ),
    5859                bitfieldWidth( nullptr ),
    5960                hasEllipsis( false ),
     
    104105        newnode->builtin = NoBuiltinType;
    105106        newnode->type = maybeClone( type );
     107        newnode->inLine = inLine;
    106108        newnode->storageClasses = storageClasses;
    107109        newnode->funcSpecs = funcSpecs;
     
    10071009                                                        if ( ReferenceToType * aggr = dynamic_cast<ReferenceToType *>( dwt->get_type() ) ) {
    10081010                                                                if ( aggr->name.find("anonymous") == std::string::npos ) {
    1009                                                                         bool isInline = false;
    1010                                                                         if (cur->type->kind == TypeData::Aggregate || cur->type->kind == TypeData::AggregateInst) {
    1011                                                                                 if (cur->type->kind == TypeData::Aggregate) {
    1012                                                                                         isInline = cur->type->aggregate.inLine;
    1013                                                                                 } else {
    1014                                                                                         isInline = cur->type->aggInst.inLine;
    1015                                                                                         if ( TypeData * aggr = cur->type->aggInst.aggregate ) {
    1016                                                                                                 if ( aggr->kind == TypeData::Aggregate ) {
    1017                                                                                                         isInline = isInline || aggr->aggregate.inLine;
    1018                                                                                                 }
    1019                                                                                         }
    1020                                                                                 }
    1021                                                                         }
    1022                                                                         if (! isInline) {
     1011                                                                        // bool isInline = false;
     1012                                                                        // if (cur->type->kind == TypeData::Aggregate || cur->type->kind == TypeData::AggregateInst) {
     1013                                                                        //      if (cur->type->kind == TypeData::Aggregate) {
     1014                                                                        //              isInline = cur->type->aggregate.inLine;
     1015                                                                        //      } else {
     1016                                                                        //              isInline = cur->type->aggInst.inLine;
     1017                                                                        //              if ( TypeData * aggr = cur->type->aggInst.aggregate ) {
     1018                                                                        //                      if ( aggr->kind == TypeData::Aggregate ) {
     1019                                                                        //                              isInline = isInline || aggr->aggregate.inLine;
     1020                                                                        //                      }
     1021                                                                        //              }
     1022                                                                        //      }
     1023                                                                        // }
     1024                                                                        // if (! isInline) {
     1025                                                                        if ( ! cur->inLine ) {
    10231026                                                                                // temporary: warn about anonymous member declarations of named types, since this conflicts with the syntax for the forward declaration of an anonymous type
    10241027                                                                                SemanticWarning( cur->location, Warning::AggrForwardDecl, aggr->name.c_str() );
Note: See TracChangeset for help on using the changeset viewer.