diff options
author | bloodstalker <thabogre@gmail.com> | 2017-02-05 05:48:47 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2017-02-05 05:48:47 +0000 |
commit | f38d89c59504d0b0ed2b4812b3b601bb5ba6752a (patch) | |
tree | 4e1bf3f75f2686901bb023ea1cfe55dc68e6efc5 /mutator-lvl0.cpp | |
parent | did a lil change on the win_build (diff) | |
download | mutator-f38d89c59504d0b0ed2b4812b3b601bb5ba6752a.tar.gz mutator-f38d89c59504d0b0ed2b4812b3b601bb5ba6752a.zip |
added 2.2,2.3,4.2,9.2. we already have tdd tests for all of them.
Diffstat (limited to '')
-rw-r--r-- | mutator-lvl0.cpp | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/mutator-lvl0.cpp b/mutator-lvl0.cpp index ddf4cbc..a1129d0 100644 --- a/mutator-lvl0.cpp +++ b/mutator-lvl0.cpp @@ -7267,10 +7267,44 @@ public: Info.FormatDiagnostic(DiagBuffer); - std::cout << "ClangDiag:" << DiagBuffer.str().str() << ":" << SL.printToString(SM) << ":" << std::endl; + std::cout << "ClangDiag:" << DiagBuffer.str().str() << ":" << SL.printToString(SM) << ":" << Info.getID() << ":" << std::endl; XMLDocOut.XMLAddNode(SpellingLine, SpellingColumn, FileName, "ClangDiag", DiagBuffer.str().str()); JSONDocOUT.JSONAddElement(SpellingLine, SpellingColumn, FileName, "ClangDiag", DiagBuffer.str().str()); + + if (Info.getID() == 872U) + { + std::cout << "2.2:" << "Illegal comment format(/*...*/) used:" << SL.printToString(SM) << ":" << std::endl; + + XMLDocOut.XMLAddNode(SpellingLine, SpellingColumn, FileName, "2.2", "Illegal comment format(/*...*/) used:"); + JSONDocOUT.JSONAddElement(SpellingLine, SpellingColumn, FileName, "2.2", "Illegal comment format(/*...*/) used:"); + } + + if (Info.getID() == 974U) + { + std::cout << "2.3:" << "Use of the character sequence /* inside a comment is illegal:" << SL.printToString(SM) << ":" << std::endl; + + XMLDocOut.XMLAddNode(SpellingLine, SpellingColumn, FileName, "2.3", "Use of the character sequence /* inside a comment is illegal:"); + JSONDocOUT.JSONAddElement(SpellingLine, SpellingColumn, FileName, "2.3", "Use of the character sequence /* inside a comment is illegal:"); + } + + if (Info.getID() == 938U) + { + std::cout << "4.2:" << "Use of trigraphs is illegal:" << SL.printToString(SM) << ":" << std::endl; + + XMLDocOut.XMLAddNode(SpellingLine, SpellingColumn, FileName, "4.2", "Use of trigraphs is illegal:"); + JSONDocOUT.JSONAddElement(SpellingLine, SpellingColumn, FileName, "4.2", "Use of trigraphs is illegal:"); + } + + if (Info.getID() == 4578U) + { + std::cout << "9.2:" << "Brace initialization has either not been correctly used or not used at all:" << SL.printToString(SM) << ":" << std::endl; + + XMLDocOut.XMLAddNode(SpellingLine, SpellingColumn, FileName, "9.2", "Brace initialization has either not been correctly used or not used at all:"); + JSONDocOUT.JSONAddElement(SpellingLine, SpellingColumn, FileName, "9.2", "Brace initialization has either not been correctly used or not used at all:"); + } + + } private: |