aboutsummaryrefslogtreecommitdiffstats
path: root/mutator-lvl0.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mutator-lvl0.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/mutator-lvl0.h b/mutator-lvl0.h
index f4a7635..28c126c 100644
--- a/mutator-lvl0.h
+++ b/mutator-lvl0.h
@@ -460,6 +460,7 @@ class MutagenExtraction
void ExtractAncestry(clang::ast_type_traits::DynTypedNode __dtn, clang::ASTContext &__astx)
{
clang::ASTContext::DynTypedNodeList DNL = __astx.getParents(__dtn);
+ if (DNL.empty()) return void();
/*FIXME-a LastStrain. obviously well end up losing some parents in cpp if we're just picking up the
* first parent from the list.*/
@@ -470,6 +471,7 @@ class MutagenExtraction
while (DTN.getNodeKind().asStringRef().str() != "FunctionDecl")
{
DNL = __astx.getParents(DTN);
+ if (DNL.empty()) return void();
DTN = DNL[0];
LastStrain.push_back(DTN.getNodeKind().asStringRef().str());
}