From 18ade7a853fe8d693c93bb8631e3ec0d970206b0 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Mon, 21 Nov 2016 05:23:49 +0330 Subject: just added some comments to 8.1 --- mutator-lvl0.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mutator-lvl0.cpp b/mutator-lvl0.cpp index f94e9b2..58c8c99 100644 --- a/mutator-lvl0.cpp +++ b/mutator-lvl0.cpp @@ -626,6 +626,7 @@ public: SourceLocation SL = FD->getLocStart(); SL = Devi::SourceLocationHasMacro(SL, Rewrite, "start"); + /*going through the already matched functions,making sure we are not adding duplicates.*/ for (unsigned x = 0; x < VecC; ++x) { if (FuncInfoProto[x].FuncNameString == MatchedName) @@ -646,10 +647,12 @@ public: if (!FD->isThisDeclarationADefinition()) { + /*this function has a declaration that is not a definition.*/ FuncInfoProto[VecC].HasDecThatisNotDef = true; } else { + /*save the sourcelocation only if the functiondecl is a definition.*/ FuncInfoProto[VecC].StrcSL = SL.printToString(*MR.SourceManager); } @@ -659,6 +662,7 @@ public: virtual void onEndOfTranslationUnit() { + for (unsigned x = 0; x < VecC; ++x) { if (FuncInfoProto[x].HasDecThatisNotDef == false) @@ -667,6 +671,7 @@ public: std::cout << FuncInfoProto[x].StrcSL << "\n" << std::endl; } } + } private: -- cgit v1.2.3