- Timestamp:
- Dec 16, 2023, 1:01:44 AM (2 years ago)
- Branches:
- master, stuck-waitfor-destruct
- Children:
- b7898ac
- Parents:
- 0fa0201d (diff), 69ab896 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- src/AST
- Files:
-
- 4 edited
-
Decl.cpp (modified) (2 diffs)
-
Expr.cpp (modified) (3 diffs)
-
LinkageSpec.cpp (modified) (2 diffs)
-
TypeSubstitution.hpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Decl.cpp
r0fa0201d r5546eee4 9 9 // Author : Aaron B. Moss 10 10 // Created On : Thu May 9 10:00:00 2019 11 // Last Modified By : Andrew Beach12 // Last Modified On : Thu May 5 12:10:00 202213 // Update Count : 2411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Dec 9 16:28:51 2023 13 // Update Count : 31 14 14 // 15 15 … … 113 113 // --- EnumDecl 114 114 115 bool EnumDecl::valueOf( const Decl * enumerator, long long & value ) const {115 bool EnumDecl::valueOf( const Decl * enumerator, long long & value ) const { 116 116 if ( enumValues.empty() ) { 117 117 Evaluation crntVal = {0, true, true}; // until expression is given, we know to start counting from 0 118 118 for ( const Decl * member : members ) { 119 const ObjectDecl * field = strict_dynamic_cast< const ObjectDecl* >( member );119 const ObjectDecl * field = strict_dynamic_cast< const ObjectDecl * >( member ); 120 120 if ( field->init ) { 121 const SingleInit * init = strict_dynamic_cast< const SingleInit * >( field->init.get() );121 const SingleInit * init = strict_dynamic_cast< const SingleInit * >( field->init.get() ); 122 122 crntVal = eval( init->value ); 123 123 if ( ! crntVal.isEvaluableInGCC ) { 124 SemanticError( init->location, ::toString( "Non-constexpr in initialization of " 125 "enumerator: ", field ) ); 124 SemanticError( init->location, "Non-constexpr in initialization of enumerator %s", field->name.c_str() ); 126 125 } 127 126 } 128 127 if ( enumValues.count( field->name ) != 0 ) { 129 SemanticError( location, ::toString( "Enum ", name, " has multiple members with the " "name ", field->name) );128 SemanticError( location, "Enum %s has multiple members with %s", name.c_str(), field->name.c_str() ); 130 129 } 131 130 if (crntVal.hasKnownValue) { -
src/AST/Expr.cpp
r0fa0201d r5546eee4 9 9 // Author : Aaron B. Moss 10 10 // Created On : Wed May 15 17:00:00 2019 11 // Last Modified By : Andrew Beach11 // Last Modified By : Peter A. Buhr 12 12 // Created On : Wed May 18 13:56:00 2022 13 // Update Count : 813 // Update Count : 12 14 14 // 15 15 … … 168 168 return addrType( refType->base ); 169 169 } else { 170 SemanticError( loc, arg->result.get(),171 "Attempt to take address of non-lvalue expression: ");170 SemanticError( loc, "Attempt to take address of non-lvalue expression %s", 171 toString( arg->result.get() ).c_str() ); 172 172 } 173 173 } … … 240 240 return 1; 241 241 } 242 SemanticError( this, "Constant expression of non-integral type " ); 242 SemanticError( this->location, "Constant expression of non-integral type %s", 243 toString( this ).c_str() ); 243 244 } 244 245 -
src/AST/LinkageSpec.cpp
r0fa0201d r5546eee4 9 9 // Author : Aaron B. Moss 10 10 // Created On : Thu May 9 10:00:00 2019 11 // Last Modified By : Aaron B. Moss12 // Last Modified On : Thu May 9 10:00:00 201913 // Update Count : 111 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Dec 11 16:08:58 2023 13 // Update Count : 2 14 14 // 15 15 … … 37 37 return spec; 38 38 } else { 39 SemanticError( loc, "Invalid linkage specifier " + *cmd);39 SemanticError( loc, "Invalid linkage specifier %s", cmd->c_str() ); 40 40 } 41 41 } -
src/AST/TypeSubstitution.hpp
r0fa0201d r5546eee4 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Thr May 25 12:31:00 202313 // Update Count : 1 011 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Dec 11 16:07:30 2023 13 // Update Count : 15 14 14 // 15 15 … … 156 156 } // if 157 157 } else { 158 SemanticError( formal, toString( "Attempt to provide non-type parameter: ", toString( *actualIt ).c_str(), " for type parameter " ) ); 158 SemanticError( formal->location, "Attempt to provide non-type parameter %s for type parameter %s", 159 toString( *actualIt ).c_str(), formal->name.c_str() ); 159 160 } // if 160 161 } else {
Note:
See TracChangeset
for help on using the changeset viewer.