aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mutator-lvl0.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/mutator-lvl0.h b/mutator-lvl0.h
index 20b26db..31bea3e 100644
--- a/mutator-lvl0.h
+++ b/mutator-lvl0.h
@@ -30,6 +30,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.*
#include <string>
#include <vector>
#include <unordered_map>
+/*clang headers*/
+#include "clang/AST/ASTContext.h"
+#include "clang/AST/ASTTypeTraits.h"
/**********************************************************************************************************************/
/*externals*/
std::map<std::string,bool> MC2OptsMap = {
@@ -345,6 +348,34 @@ class MutatorLVL0Tests
};
/**********************************************************************************************************************/
+#define EXTRACT_MUTAGEN
+
+class MutagenExtraction
+{
+ public:
+ MutagenExtraction() {}
+
+ void ExtractAncestry(clang::ast_type_traits::DynTypedNode __dtn, clang::ASTContext &__astx)
+ {
+ clang::ASTContext::DynTypedNodeList DNL = __astx.getParents(__dtn);
+
+ std::vector<std::string> temp;
+
+ temp.push_back(DNL[0].getNodeKind().asStringRef().str());
+
+ while (__astx.getParents(__dtn)[0].getNodeKind().asStringRef().str() != "FunctionDecl")
+ {
+ DNL = __astx.getParents(__dtn);
+ temp.push_back(DNL[0].getNodeKind().asStringRef().str());
+ }
+
+ MutantStrainsAncestry.push_back(temp);
+ }
+
+ private:
+ std::vector<std::vector<std::string>> MutantStrainsAncestry;
+};
+/**********************************************************************************************************************/
#endif
/**********************************************************************************************************************/
/*last line intentionally left blank*/