Changeset 679e644 for src/Parser/DeclarationNode.cc
- Timestamp:
- Jul 19, 2018, 10:30:56 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:
- 679a260
- Parents:
- 2f84692
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r2f84692 r679e644 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 6 06:56:08201813 // Update Count : 10 8812 // Last Modified On : Wed Jul 18 22:50:27 2018 13 // Update Count : 1096 14 14 // 15 15 … … 56 56 builtin( NoBuiltinType ), 57 57 type( nullptr ), 58 inLine( false ), 58 59 bitfieldWidth( nullptr ), 59 60 hasEllipsis( false ), … … 104 105 newnode->builtin = NoBuiltinType; 105 106 newnode->type = maybeClone( type ); 107 newnode->inLine = inLine; 106 108 newnode->storageClasses = storageClasses; 107 109 newnode->funcSpecs = funcSpecs; … … 1007 1009 if ( ReferenceToType * aggr = dynamic_cast<ReferenceToType *>( dwt->get_type() ) ) { 1008 1010 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 ) { 1023 1026 // temporary: warn about anonymous member declarations of named types, since this conflicts with the syntax for the forward declaration of an anonymous type 1024 1027 SemanticWarning( cur->location, Warning::AggrForwardDecl, aggr->name.c_str() );
Note: See TracChangeset
for help on using the changeset viewer.