Changes in src/Parser/DeclarationNode.cc [2e02851:3d7e53b]
- File:
-
- 1 edited
-
src/Parser/DeclarationNode.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r2e02851 r3d7e53b 1003 1003 // }; 1004 1004 if ( ! (extracted && decl->name == "" && ! anon) ) { 1005 if (decl->name == "") {1006 if ( DeclarationWithType * dwt = dynamic_cast<DeclarationWithType *>( decl ) ) {1007 if ( ReferenceToType * aggr = dynamic_cast<ReferenceToType *>( dwt->get_type() ) ) {1008 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) {1023 // temporary: warn about anonymous member declarations of named types, since this conflicts with the syntax for the forward declaration of an anonymous type1024 SemanticWarning( cur->location, Warning::AggrForwardDecl, aggr->name.c_str() );1025 }1026 }1027 }1028 }1029 }1030 1005 decl->location = cur->location; 1031 1006 * out++ = decl;
Note:
See TracChangeset
for help on using the changeset viewer.