diff options
author | bloodstalker <thabogre@gmail.com> | 2016-11-30 09:49:31 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2016-11-30 09:49:31 +0000 |
commit | fed789f1dc17e84c86758a8d81476367469a8a56 (patch) | |
tree | da5b5fb31b0aad58e2ae747839836861a8d0880e | |
parent | added an overloaded member function for XMLReport to add nodes to the xml doc (diff) | |
download | mutator-fed789f1dc17e84c86758a8d81476367469a8a56.tar.gz mutator-fed789f1dc17e84c86758a8d81476367469a8a56.zip |
now uses the overloaded XMLAddNode for rules that have runonendoftranslation
Diffstat (limited to '')
-rw-r--r-- | mutator-lvl0.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mutator-lvl0.cpp b/mutator-lvl0.cpp index 2a4acfe..d877103 100644 --- a/mutator-lvl0.cpp +++ b/mutator-lvl0.cpp @@ -707,6 +707,8 @@ public: { /*save the sourcelocation only if the functiondecl is a definition.*/ FuncInfoProto[VecC].StrcSL = SL.printToString(*MR.SourceManager); + FuncInfoProto[VecC].FuncSL = SL; + FuncInfoProto[VecC].FuncFSL = MR.Context->getFullLoc(SL); } VecC++; @@ -723,6 +725,8 @@ public: { std::cout << "8.1 : " << "Function does not have a FunctionDecl that is not a definition : " << std::endl; std::cout << FuncInfoProto[x].StrcSL << "\n" << std::endl; + + XMLDocOut.XMLAddNode(FuncInfoProto[x].FuncFSL, FuncInfoProto[x].FuncSL, "8.1", "Function does not have a FunctionDecl that is not a definition : "); } } @@ -733,6 +737,8 @@ private: std::string FuncNameString; std::string StrcSL; bool HasDecThatisNotDef = false; + SourceLocation FuncSL; + FullSourceLoc FuncFSL; }; std::vector<FuncInfo> FuncInfoProto; @@ -1904,6 +1910,8 @@ public: FuncScopeProto.push_back(FuncScope()); FuncScopeProto[VecC].FuncNameString = MatchedName; FuncScopeProto[VecC].DefinitionSL = FDSL.printToString(*MR.SourceManager); + FuncScopeProto[VecC].FuncScopeSL = FDSL; + FuncScopeProto[VecC].FuncScopeFSL = MR.Context->getFullLoc(FDSL); if (FDDef->isExternC()) { @@ -1926,6 +1934,8 @@ public: { std::cout << "8.11 : " << "Function does not have any external calls but is not declared as static : " << std::endl; std::cout << FuncScopeProto[x].DefinitionSL << "\n" << std::endl; + + XMLDocOut.XMLAddNode(FuncScopeProto[x].FuncScopeFSL, FuncScopeProto[x].FuncScopeSL, "8.11", "Function does not have any external calls but is not declared as static : "); } } } @@ -1935,6 +1945,8 @@ private: std::string FuncNameString; bool hasExternalCall = false; std::string DefinitionSL; + SourceLocation FuncScopeSL; + FullSourceLoc FuncScopeFSL; }; bool AlreadyTagged = false; |