From c8942eb9548d7a75c902a5bdc1e87b974555dffe Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Fri, 28 Apr 2017 01:06:29 +0430 Subject: minor fixes --- mutator-lvl0.cpp | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'mutator-lvl0.cpp') diff --git a/mutator-lvl0.cpp b/mutator-lvl0.cpp index 2f16974..37ecde0 100644 --- a/mutator-lvl0.cpp +++ b/mutator-lvl0.cpp @@ -60,6 +60,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.* #include "clang/Rewrite/Core/Rewriter.h" /*LLVM headers*/ #include "llvm/ADT/SmallString.h" +#include "llvm/ADT/APInt.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/raw_ostream.h" #include "llvm/IR/Function.h" @@ -8433,8 +8434,25 @@ int main(int argc, const char **argv) IsThereJunkPreInclusion ITJPIInstance; ITJPIInstance.Check(SourcePathList); + + int RunResult = 0; - int RunResult = Tool.run(newFrontendActionFactory().get()); + try + { + RunResult = Tool.run(newFrontendActionFactory().get()); + } + catch (MutExHeaderNotFound &E1) + { + std::cerr << E1.what() << "\n"; + } + catch (std::domain_error &E2) + { + std::cerr << E2.what() << "\n"; + } + catch(...) + { + std::cerr << "Unexpected exception!\n"; + } CheckForNullStatements CheckForNull; @@ -8446,16 +8464,6 @@ int main(int argc, const char **argv) JSONDocOUT.CloseReport(); - try {} - catch (MutExHeaderNotFound &E1) - { - std::cerr << E1.what() << "\n"; - } - catch (std::domain_error &E2) - { - std::cerr << E2.what() << "\n"; - } - return RunResult; } /*last line intentionally left blank.*/ -- cgit v1.2.3