Changes in / [0766399:7d415b4]


Ignore:
Location:
src
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Node.hpp

    r0766399 r7d415b4  
    161161                }
    162162        }
    163         errors.throwIfNonEmpty();
     163        if ( ! errors.isEmpty() ) {
     164                throw errors;
     165        }
    164166}
    165167
  • src/AST/Pass.impl.hpp

    r0766399 r7d415b4  
    250250        }
    251251        pass_visitor_stats.depth--;
    252         errors.throwIfNonEmpty();
     252        if ( !errors.isEmpty() ) { throw errors; }
    253253
    254254        return new_kids;
     
    287287        __pedantic_pass_assert( new_kids.size() == container.size() );
    288288        pass_visitor_stats.depth--;
    289         errors.throwIfNonEmpty();
     289        if ( !errors.isEmpty() ) { throw errors; }
    290290
    291291        return ast::__pass::resultN<container_t, node_t>{ mutated, new_kids };
     
    401401        }
    402402        pass_visitor_stats.depth--;
    403         errors.throwIfNonEmpty();
     403        if ( !errors.isEmpty() ) { throw errors; }
    404404}
    405405
  • src/Common/ErrorObjects.hpp

    r0766399 r7d415b4  
    4141        void append( SemanticErrorException & other );
    4242        void append( CodeLocation location, const std::string & );
    43         void throwIfNonEmpty();
     43        bool isEmpty() const;
    4444        void print();
    4545  private:
  • src/Common/SemanticError.cpp

    r0766399 r7d415b4  
    8888}
    8989
    90 void SemanticErrorException::throwIfNonEmpty() {
    91         if ( !errors.empty() ) {
    92                 throw *this;
    93         }
     90bool SemanticErrorException::isEmpty() const {
     91        return errors.empty();
    9492}
    9593
  • src/ControlStruct/MultiLevelExit.cpp

    r0766399 r7d415b4  
    688688        }
    689689
    690         errors.throwIfNonEmpty();
     690        if ( !errors.isEmpty() ) {
     691                throw errors;
     692        }
    691693        return ret;
    692694}
  • src/InitTweak/FixInit.cpp

    r0766399 r7d415b4  
    301301                } // try
    302302        } // for
    303         errors.throwIfNonEmpty();
     303        if ( ! errors.isEmpty() ) {
     304                throw errors;
     305        } // if
    304306}
    305307
     
    11711173                function->stmts = mutStmts;
    11721174        }
    1173         errors.throwIfNonEmpty();
     1175        if (! errors.isEmpty()) {
     1176                throw errors;
     1177        }
    11741178        return function;
    11751179}
  • src/Parser/DeclarationNode.cpp

    r0766399 r7d415b4  
    829829        } // for
    830830
    831         errors.throwIfNonEmpty();
     831        if ( ! errors.isEmpty() ) {
     832                throw errors;
     833        } // if
    832834} // buildList
    833835
     
    877879        } // for
    878880
    879         errors.throwIfNonEmpty();
     881        if ( ! errors.isEmpty() ) {
     882                throw errors;
     883        } // if
    880884} // buildList
    881885
     
    893897        } // for
    894898
    895         errors.throwIfNonEmpty();
     899        if ( ! errors.isEmpty() ) {
     900                throw errors;
     901        } // if
    896902} // buildTypeList
    897903
  • src/Parser/DeclarationNode.hpp

    r0766399 r7d415b4  
    156156                } // try
    157157        } // for
    158         errors.throwIfNonEmpty();
     158        if ( ! errors.isEmpty() ) {
     159                throw errors;
     160        } // if
    159161}
    160162
  • src/ResolvExpr/CandidateFinder.cpp

    r0766399 r7d415b4  
    11151115                // Implement SFINAE; resolution errors are only errors if there aren't any non-error
    11161116                // candidates
    1117                 if ( found.empty() ) errors.throwIfNonEmpty();
     1117                if ( found.empty() && ! errors.isEmpty() ) { throw errors; }
    11181118
    11191119                // only keep the best matching intrinsic result to match C semantics (no unexpected narrowing/widening)
  • src/Validate/CheckAssertions.cpp

    r0766399 r7d415b4  
    6060                makeTypeVarMap( decl, typeVars );
    6161                checkList( typeVars, errors, decl->assertions );
    62                 errors.throwIfNonEmpty();
     62                if ( !errors.isEmpty() ) { throw errors; }
    6363        }
    6464
     
    7272                }
    7373                if ( checkMembers ) checkList( typeVars, errors, decl->members );
    74                 errors.throwIfNonEmpty();
     74                if ( !errors.isEmpty() ) { throw errors; }
    7575        }
    7676
  • src/Validate/ReplaceTypedef.cpp

    r0766399 r7d415b4  
    327327        assert( declsToAddBefore.empty() );
    328328        assert( declsToAddAfter.empty() );
    329         errors.throwIfNonEmpty();
     329        if ( !errors.isEmpty() ) { throw errors; }
    330330
    331331        mut->members.clear();
Note: See TracChangeset for help on using the changeset viewer.