Changes in src/SynTree/FunctionDecl.cc [4e24610:d3b7937]
- File:
-
- 1 edited
-
src/SynTree/FunctionDecl.cc (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/FunctionDecl.cc
r4e24610 rd3b7937 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // FunctionDecl.cc -- 7 // FunctionDecl.cc -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Fri May 06 11:35:09 201611 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jul 13 18:11:44 2015 13 13 // Update Count : 19 14 14 // … … 21 21 #include "Common/utility.h" 22 22 23 FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn , Attribute attribute)24 : Parent( name, sc, linkage ), type( type ), statements( statements ) , attribute( attribute ){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 25 set_isInline( isInline ); 26 26 set_isNoreturn( isNoreturn ); … … 32 32 33 33 FunctionDecl::FunctionDecl( const FunctionDecl &other ) 34 : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) , attribute( other.attribute ){34 : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) { 35 35 } 36 36 … … 52 52 using std::endl; 53 53 using std::string; 54 54 55 55 if ( get_name() != "" ) { 56 56 os << get_name() << ": "; … … 65 65 os << "_Noreturn "; 66 66 } // if 67 switch ( attribute ) {68 case Constructor:69 os << "Global Constructor ";70 break;71 case Destructor:72 os << "Global Destructor ";73 break;74 default:75 break;76 }77 67 if ( get_storageClass() != DeclarationNode::NoStorageClass ) { 78 68 os << DeclarationNode::storageName[ get_storageClass() ] << ' '; … … 104 94 using std::endl; 105 95 using std::string; 106 96 107 97 if ( get_name() != "" ) { 108 98 os << get_name() << ": "; … … 114 104 os << "_Noreturn "; 115 105 } // if 116 switch ( attribute ) {117 case Constructor:118 os << " Global Constructor ";119 break;120 case Destructor:121 os << " Global Destructor ";122 break;123 default:124 break;125 }126 106 if ( get_storageClass() != DeclarationNode::NoStorageClass ) { 127 107 os << DeclarationNode::storageName[ get_storageClass() ] << ' ';
Note:
See TracChangeset
for help on using the changeset viewer.