Changeset e07caa2 for src/Parser/DeclarationNode.cc
- Timestamp:
- Jul 19, 2018, 6:16:41 PM (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:
- 68bceeb
- Parents:
- 679a260
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r679a260 re07caa2 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 18 22:50:27201813 // Update Count : 1 09612 // Last Modified On : Thu Jul 19 17:40:03 2018 13 // Update Count : 1106 14 14 // 15 15 … … 54 54 55 55 DeclarationNode::DeclarationNode() : 56 builtin( NoBuiltinType ), 57 type( nullptr ), 58 inLine( false ), 59 bitfieldWidth( nullptr ), 60 hasEllipsis( false ), 61 linkage( ::linkage ), 62 asmName( nullptr ), 63 initializer( nullptr ), 64 extension( false ), 65 asmStmt( nullptr ) { 56 linkage( ::linkage ) { 66 57 67 58 // variable.name = nullptr; … … 1004 995 // struct T; // anonymous member 1005 996 // }; 1006 if ( ! (extracted && decl->name == "" && ! anon ) ) {1007 if ( decl->name == "") {997 if ( ! (extracted && decl->name == "" && ! anon && ! cur->get_inLine()) ) { 998 if ( decl->name == "" ) { 1008 999 if ( DeclarationWithType * dwt = dynamic_cast<DeclarationWithType *>( decl ) ) { 1009 1000 if ( ReferenceToType * aggr = dynamic_cast<ReferenceToType *>( dwt->get_type() ) ) { 1010 1001 if ( aggr->name.find("anonymous") == std::string::npos ) { 1011 if ( ! cur->inLine ) { 1012 // temporary: warn about anonymous member declarations of named types, since this conflicts with the syntax for the forward declaration of an anonymous type 1002 if ( ! cur->get_inLine() ) { 1003 // temporary: warn about anonymous member declarations of named types, since 1004 // this conflicts with the syntax for the forward declaration of an anonymous type 1013 1005 SemanticWarning( cur->location, Warning::AggrForwardDecl, aggr->name.c_str() ); 1014 } 1015 } 1016 } 1017 } 1018 } 1006 } // if 1007 } // if 1008 } // if 1009 } // if 1010 } // if 1019 1011 decl->location = cur->location; 1020 * 1021 } 1012 *out++ = decl; 1013 } // if 1022 1014 } // if 1023 1015 } catch( SemanticErrorException &e ) { 1024 1016 errors.append( e ); 1025 1017 } // try 1026 } // while1018 } // for 1027 1019 1028 1020 if ( ! errors.isEmpty() ) {
Note: See TracChangeset
for help on using the changeset viewer.