diff options
author | bloodstalker <thabogre@gmail.com> | 2017-01-03 21:10:50 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2017-01-03 21:10:50 +0000 |
commit | 9f7c9e5fb83257e8970109a82f0841b357e05c10 (patch) | |
tree | aded7ac91d0d5d22f7f5e1bb5e67f778fcaaecd0 /mutator-lvl0.cpp | |
parent | deleted a comment (diff) | |
download | mutator-9f7c9e5fb83257e8970109a82f0841b357e05c10.tar.gz mutator-9f7c9e5fb83257e8970109a82f0841b357e05c10.zip |
removed 9.2 output. clag catches it.
Diffstat (limited to '')
-rw-r--r-- | mutator-lvl0.cpp | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/mutator-lvl0.cpp b/mutator-lvl0.cpp index b88eff3..443be9f 100644 --- a/mutator-lvl0.cpp +++ b/mutator-lvl0.cpp @@ -1356,9 +1356,23 @@ public: const VarDecl* VD = MR.Nodes.getNodeAs<clang::VarDecl>("mcinit91"); SourceLocation SL = VD->getLocStart(); + SourceLocation SLMID; + + if (SL.isMacroID()) + { + SLMID = Devi::SourceLocationHasMacro(SL, Rewrite, "start"); + } + SL = Devi::SourceLocationHasMacro(SL, Rewrite, "start"); SourceLocation SLE = VD->getLocEnd(); - SLE = Devi::SourceLocationHasMacro(SLE, Rewrite, "start"); + SourceLocation SLEMID; + + if (SLE.isMacroID()) + { + SLEMID = Devi::SourceLocationHasMacro(SLE, Rewrite, "end"); + } + + SLE = Devi::SourceLocationHasMacro(SLE, Rewrite, "end"); QualType QT = VD->getType(); @@ -1439,8 +1453,12 @@ public: /*JANKY*/ const Expr* InitExpr [[maybe_unused]] = VD->getInit(); SourceRange InitExprSR; - InitExprSR.setBegin(SL); - InitExprSR.setEnd(SLE); + SourceLocation IESL = InitExpr->getLocStart(); + IESL = Devi::SourceLocationHasMacro(IESL, Rewrite, "start"); + SourceLocation IESLE = InitExpr->getLocEnd(); + IESLE = Devi::SourceLocationHasMacro(IESLE, Rewrite, "end"); + InitExprSR.setBegin(IESL); + InitExprSR.setEnd(IESLE); std::string InitExprString = Rewrite.getRewrittenText(InitExprSR); size_t openingcbraces = InitExprString.find("{", 0); @@ -1456,11 +1474,13 @@ public: { if (Devi::IsTheMatchInMainFile(MainFileOnly, MR, SL)) { +#if 0 std::cout << "9.2:" << "Curly braces not used:"; std::cout << SL.printToString(*MR.SourceManager) << ":" << std::endl; XMLDocOut.XMLAddNode(MR.Context, SL, "9.2", "Curly braces not used : "); JSONDocOUT.JSONAddElement(MR.Context, SL, "9.2", "Curly braces not used : "); +#endif } } } |