Changeset a7c90d4 for src/SynTree/FunctionDecl.cc
- Timestamp:
- Mar 7, 2017, 8:33:43 AM (8 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, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 64cb860, c3396e0
- Parents:
- 7fe2498
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/FunctionDecl.cc
r7fe2498 ra7c90d4 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Mar 3 21:29:41201713 // Update Count : 5512 // Last Modified On : Tue Mar 7 07:54:58 2017 13 // Update Count : 68 14 14 // 15 15 … … 26 26 extern bool translation_unit_nomain; 27 27 28 FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, std::list< Attribute * > attributes, DeclarationNode::FuncSpec fs ) 29 : Parent( name, sc, linkage, attributes, fs ), type( type ), statements( statements ) { 30 set_functionSpecifiers( fs ); 31 28 FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClasses scs, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, std::list< Attribute * > attributes, DeclarationNode::FuncSpecifiers fs ) 29 : Parent( name, scs, linkage, attributes, fs ), type( type ), statements( statements ) { 32 30 // hack forcing the function "main" to have Cforall linkage to replace main even if it is inside an extern 33 31 if ( name == "main" ) { … … 37 35 38 36 FunctionDecl::FunctionDecl( const FunctionDecl &other ) 39 : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) {37 : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) { 40 38 } 41 39 … … 67 65 printAll( get_attributes(), os, indent ); 68 66 69 if ( get_storageClass() != DeclarationNode::NoStorageClass ) { 70 os << DeclarationNode::storageClassNames[ get_storageClass() ] << ' '; 71 } // if 67 DeclarationNode::print_StorageClass( os, get_storageClasses() ); 72 68 DeclarationNode::print_FuncSpec( os, get_funcSpec() ); 73 69 … … 95 91 // xxx - should printShort print attributes? 96 92 97 if ( get_storageClass() != DeclarationNode::NoStorageClass ) { 98 os << DeclarationNode::storageClassNames[ get_storageClass() ] << ' '; 99 } // if 93 DeclarationNode::print_StorageClass( os, get_storageClasses() ); 100 94 DeclarationNode::print_FuncSpec( os, get_funcSpec() ); 101 95
Note: See TracChangeset
for help on using the changeset viewer.