aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2016-12-26 22:42:42 +0000
committerbloodstalker <thabogre@gmail.com>2016-12-26 22:42:42 +0000
commit4d52c188e1a502cdb6e97b57d38b313f32742fa7 (patch)
tree97e56b5fc16de208505d288edd9069b138f4d9c4
parentadded the json report writer implementations (diff)
downloadmutator-4d52c188e1a502cdb6e97b57d38b313f32742fa7.tar.gz
mutator-4d52c188e1a502cdb6e97b57d38b313f32742fa7.zip
added the json report writer interface
Diffstat (limited to '')
-rw-r--r--mutator_aux.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/mutator_aux.h b/mutator_aux.h
index ed7d1a4..16f4a0f 100644
--- a/mutator_aux.h
+++ b/mutator_aux.h
@@ -8,6 +8,7 @@
/*********************************************************************************************************************/
/*inclusion directives*/
#include <string>
+#include <fstream>
#include "clang/AST/AST.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Rewrite/Core/Rewriter.h"
@@ -38,6 +39,23 @@ private:
XMLNode* RootPointer;
};
+class JSONReport
+{
+public:
+ JSONReport();
+
+ void JSONCreateReport(void);
+ void JSONAddElement(ASTContext* ASTC, SourceLocation SL, std::string MisraRule, std::string Description);
+ /*overload for checks that announce the result in onendoftranslation unit.*/
+ void JSONAddElement(FullSourceLoc FSL, SourceLocation SL, std::string MisraRule, std::string Description);
+ /*overload for PPCallbacks.*/
+ void JSONAddElement(const SourceManager &SM, SourceLocation SL, std::string MisraRule, std::string Description);
+ void CloseReport(void);
+
+private:
+ std::ofstream JSONRepFile;
+};
+
}
#endif