aboutsummaryrefslogtreecommitdiffstats
path: root/mutator-lvl0.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mutator-lvl0.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/mutator-lvl0.cpp b/mutator-lvl0.cpp
index e5fd494..f73bd6a 100644
--- a/mutator-lvl0.cpp
+++ b/mutator-lvl0.cpp
@@ -89,6 +89,7 @@ using namespace clang::tooling;
/*global vars*/
Devi::XMLReport XMLDocOut;
Devi::JSONReport JSONDocOUT;
+MutagenExtraction ME;
std::vector<SourceLocation> MacroDefSourceLocation;
std::vector<SourceLocation> MacroUndefSourceLocation;
@@ -438,14 +439,14 @@ public:
{
const IfStmt *IS = MR.Nodes.getNodeAs<clang::IfStmt>("mcelse");
-#if 1
if (mutagen)
{
ME.ExtractAncestry(ast_type_traits::DynTypedNode::create(*IS), *MR.Context);
+#if 0
ME.DumpLast();
ME.DumpAll();
- }
#endif
+ }
SourceLocation SL = IS->getLocStart();
CheckSLValidity(SL);
@@ -472,7 +473,6 @@ public:
}
private:
- MutagenExtraction ME;
Rewriter &Rewrite;
};
/**********************************************************************************************************************/
@@ -486,6 +486,11 @@ public:
{
const IfStmt *IS = MR.Nodes.getNodeAs<clang::IfStmt>("mcif");
+ if (mutagen)
+ {
+ ME.ExtractAncestry(ast_type_traits::DynTypedNode::create(*IS), *MR.Context);
+ }
+
SourceLocation SL = IS->getLocStart();
CheckSLValidity(SL);
SL = Devi::SourceLocationHasMacro(SL, Rewrite, "start");
@@ -8386,7 +8391,6 @@ public:
}
private:
- MutagenExtraction ME;
Rewriter TheRewriter;
};
/**********************************************************************************************************************/
@@ -8475,6 +8479,9 @@ int main(int argc, const char **argv)
XMLDocOut.SaveReport();
JSONDocOUT.CloseReport();
+
+ ME.DumpAll();
+ ME.XMLReport();
return RunResult;
}