Changes in / [0766399:7d415b4]
- Location:
- src
- Files:
-
- 11 edited
-
AST/Node.hpp (modified) (1 diff)
-
AST/Pass.impl.hpp (modified) (3 diffs)
-
Common/ErrorObjects.hpp (modified) (1 diff)
-
Common/SemanticError.cpp (modified) (1 diff)
-
ControlStruct/MultiLevelExit.cpp (modified) (1 diff)
-
InitTweak/FixInit.cpp (modified) (2 diffs)
-
Parser/DeclarationNode.cpp (modified) (3 diffs)
-
Parser/DeclarationNode.hpp (modified) (1 diff)
-
ResolvExpr/CandidateFinder.cpp (modified) (1 diff)
-
Validate/CheckAssertions.cpp (modified) (2 diffs)
-
Validate/ReplaceTypedef.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Node.hpp
r0766399 r7d415b4 161 161 } 162 162 } 163 errors.throwIfNonEmpty(); 163 if ( ! errors.isEmpty() ) { 164 throw errors; 165 } 164 166 } 165 167 -
src/AST/Pass.impl.hpp
r0766399 r7d415b4 250 250 } 251 251 pass_visitor_stats.depth--; 252 errors.throwIfNonEmpty();252 if ( !errors.isEmpty() ) { throw errors; } 253 253 254 254 return new_kids; … … 287 287 __pedantic_pass_assert( new_kids.size() == container.size() ); 288 288 pass_visitor_stats.depth--; 289 errors.throwIfNonEmpty();289 if ( !errors.isEmpty() ) { throw errors; } 290 290 291 291 return ast::__pass::resultN<container_t, node_t>{ mutated, new_kids }; … … 401 401 } 402 402 pass_visitor_stats.depth--; 403 errors.throwIfNonEmpty();403 if ( !errors.isEmpty() ) { throw errors; } 404 404 } 405 405 -
src/Common/ErrorObjects.hpp
r0766399 r7d415b4 41 41 void append( SemanticErrorException & other ); 42 42 void append( CodeLocation location, const std::string & ); 43 void throwIfNonEmpty();43 bool isEmpty() const; 44 44 void print(); 45 45 private: -
src/Common/SemanticError.cpp
r0766399 r7d415b4 88 88 } 89 89 90 void SemanticErrorException::throwIfNonEmpty() { 91 if ( !errors.empty() ) { 92 throw *this; 93 } 90 bool SemanticErrorException::isEmpty() const { 91 return errors.empty(); 94 92 } 95 93 -
src/ControlStruct/MultiLevelExit.cpp
r0766399 r7d415b4 688 688 } 689 689 690 errors.throwIfNonEmpty(); 690 if ( !errors.isEmpty() ) { 691 throw errors; 692 } 691 693 return ret; 692 694 } -
src/InitTweak/FixInit.cpp
r0766399 r7d415b4 301 301 } // try 302 302 } // for 303 errors.throwIfNonEmpty(); 303 if ( ! errors.isEmpty() ) { 304 throw errors; 305 } // if 304 306 } 305 307 … … 1171 1173 function->stmts = mutStmts; 1172 1174 } 1173 errors.throwIfNonEmpty(); 1175 if (! errors.isEmpty()) { 1176 throw errors; 1177 } 1174 1178 return function; 1175 1179 } -
src/Parser/DeclarationNode.cpp
r0766399 r7d415b4 829 829 } // for 830 830 831 errors.throwIfNonEmpty(); 831 if ( ! errors.isEmpty() ) { 832 throw errors; 833 } // if 832 834 } // buildList 833 835 … … 877 879 } // for 878 880 879 errors.throwIfNonEmpty(); 881 if ( ! errors.isEmpty() ) { 882 throw errors; 883 } // if 880 884 } // buildList 881 885 … … 893 897 } // for 894 898 895 errors.throwIfNonEmpty(); 899 if ( ! errors.isEmpty() ) { 900 throw errors; 901 } // if 896 902 } // buildTypeList 897 903 -
src/Parser/DeclarationNode.hpp
r0766399 r7d415b4 156 156 } // try 157 157 } // for 158 errors.throwIfNonEmpty(); 158 if ( ! errors.isEmpty() ) { 159 throw errors; 160 } // if 159 161 } 160 162 -
src/ResolvExpr/CandidateFinder.cpp
r0766399 r7d415b4 1115 1115 // Implement SFINAE; resolution errors are only errors if there aren't any non-error 1116 1116 // candidates 1117 if ( found.empty() ) errors.throwIfNonEmpty();1117 if ( found.empty() && ! errors.isEmpty() ) { throw errors; } 1118 1118 1119 1119 // only keep the best matching intrinsic result to match C semantics (no unexpected narrowing/widening) -
src/Validate/CheckAssertions.cpp
r0766399 r7d415b4 60 60 makeTypeVarMap( decl, typeVars ); 61 61 checkList( typeVars, errors, decl->assertions ); 62 errors.throwIfNonEmpty();62 if ( !errors.isEmpty() ) { throw errors; } 63 63 } 64 64 … … 72 72 } 73 73 if ( checkMembers ) checkList( typeVars, errors, decl->members ); 74 errors.throwIfNonEmpty();74 if ( !errors.isEmpty() ) { throw errors; } 75 75 } 76 76 -
src/Validate/ReplaceTypedef.cpp
r0766399 r7d415b4 327 327 assert( declsToAddBefore.empty() ); 328 328 assert( declsToAddAfter.empty() ); 329 errors.throwIfNonEmpty();329 if ( !errors.isEmpty() ) { throw errors; } 330 330 331 331 mut->members.clear();
Note:
See TracChangeset
for help on using the changeset viewer.