diff options
author | bloodstalker <thabogre@gmail.com> | 2016-12-31 17:06:59 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2016-12-31 17:06:59 +0000 |
commit | 5d09f9a171e2d91413515859d2f2191dd42315d4 (patch) | |
tree | 3bc7ac32b70c371e6b07eac57ddf2e4596bbb1a3 | |
parent | added some helper functions to support the new mutator-lvl0 cl options (diff) | |
download | mutator-5d09f9a171e2d91413515859d2f2191dd42315d4.tar.gz mutator-5d09f9a171e2d91413515859d2f2191dd42315d4.zip |
added the new interfaces accordingly
-rw-r--r-- | mutator_aux.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mutator_aux.h b/mutator_aux.h index 16f4a0f..4a5e816 100644 --- a/mutator_aux.h +++ b/mutator_aux.h @@ -10,6 +10,7 @@ #include <string> #include <fstream> #include "clang/AST/AST.h" +#include "clang/ASTMatchers/ASTMatchFinder.h" #include "clang/Basic/SourceManager.h" #include "clang/Rewrite/Core/Rewriter.h" #include "tinyxml2/tinyxml2.h" @@ -20,6 +21,24 @@ using namespace tinyxml2; namespace Devi { SourceLocation SourceLocationHasMacro (SourceLocation SL, Rewriter &Rewrite, std::string Kind); +bool IsTheMatchInSysHeader(bool SysHeaderFlag, const ast_matchers::MatchFinder::MatchResult &MR, SourceLocation SL); + +bool IsTheMatchInSysHeader(bool SysHeaderFlag, const SourceManager &SM, SourceLocation SL); + +bool IsTheMatchInSysHeader(bool SysHeaderFlag, bool SysHeader, SourceLocation SL); + +bool IsTheMatchInMainFile(bool MainFileFlag, const ast_matchers::MatchFinder::MatchResult &MR, SourceLocation SL); + +bool IsTheMatchInMainFile(bool MainFileFlag, const SourceManager &SM, SourceLocation SL); + +bool IsTheMatchInMainFile(bool MainFileFlag, bool MainFile, SourceLocation SL); + +/*@DEVI- for both report classes, if the program gets terminated, since the destructor does not close +the report files, what happens to them is implementation-defined in case of let's say an exit, but since +we erase the files everytime a new instance of mutator-lvl0 is called, we are fine. or so i think.*/ +/*@DEVI- in case of a crash, the XML report will only hold the base node, while the JSON report will +contain all the reports up until the crash. tinyxml2 writes the nodes to file on SaveFile which is +called in SaveReport so that's why.*/ class XMLReport { public: |