Changes in src/SynTree/FunctionDecl.cc [1db21619:de62360d]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/FunctionDecl.cc
r1db21619 rde62360d 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jul 13 18:11:44201513 // Update Count : 1 912 // Last Modified On : Sat Jun 13 09:10:32 2015 13 // Update Count : 16 14 14 // 15 15 … … 22 22 23 23 FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn ) 24 : Parent( name, sc, linkage ), type( type ), statements( statements ) { 25 set_isInline( isInline ); 26 set_isNoreturn( isNoreturn ); 24 : Parent( name, sc, linkage ), type( type ), statements( statements ), isInline( isInline ), isNoreturn( isNoreturn ) { 27 25 // this is a brazen hack to force the function "main" to have C linkage 28 26 if ( name == "main" ) { … … 32 30 33 31 FunctionDecl::FunctionDecl( const FunctionDecl &other ) 34 : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) {32 : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ), isInline( other.isInline ), isNoreturn( other.isNoreturn ) { 35 33 } 36 34 … … 59 57 os << LinkageSpec::toString( get_linkage() ) << " "; 60 58 } // if 61 if ( get_isInline()) {59 if ( isInline ) { 62 60 os << "inline "; 63 61 } // if 64 if ( get_isNoreturn()) {62 if ( isNoreturn ) { 65 63 os << "_Noreturn "; 66 64 } // if … … 98 96 os << get_name() << ": "; 99 97 } // if 100 if ( get_isInline()) {98 if ( isInline ) { 101 99 os << "inline "; 102 100 } // if 103 if ( get_isNoreturn()) {101 if ( isNoreturn ) { 104 102 os << "_Noreturn "; 105 103 } // if
Note:
See TracChangeset
for help on using the changeset viewer.