diff options
author | bloodstalker <thabogre@gmail.com> | 2017-04-27 20:36:29 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2017-04-27 20:36:29 +0000 |
commit | c8942eb9548d7a75c902a5bdc1e87b974555dffe (patch) | |
tree | 72d79884c13edab37ef426680a33decf725d2fb1 | |
parent | the ideas for bruiser (diff) | |
download | mutator-c8942eb9548d7a75c902a5bdc1e87b974555dffe.tar.gz mutator-c8942eb9548d7a75c902a5bdc1e87b974555dffe.zip |
minor fixes
-rw-r--r-- | mutator-lvl0.cpp | 30 |
1 files changed, 19 insertions, 11 deletions
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<MyFrontendAction>().get()); + try + { + RunResult = Tool.run(newFrontendActionFactory<MyFrontendAction>().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.*/ |