diff options
| author | bloodstalker <thabogre@gmail.com> | 2017-01-03 20:41:06 +0000 | 
|---|---|---|
| committer | bloodstalker <thabogre@gmail.com> | 2017-01-03 20:41:06 +0000 | 
| commit | 94504e9255ec833ed55509a2601deb4b3424fd79 (patch) | |
| tree | 0f6b9b9461c419b1e52bc6ba5acb1a52b572a222 | |
| parent | added tests for 19.4 (diff) | |
| download | mutator-94504e9255ec833ed55509a2601deb4b3424fd79.tar.gz mutator-94504e9255ec833ed55509a2601deb4b3424fd79.zip | |
fixed all ppcallbacks for macro expands. they now work correctly and actually use the sourcelocation of the macro definition not the expansion for MainOnly and SysHeader
| -rw-r--r-- | mutator-lvl0.cpp | 16 | 
1 files changed, 8 insertions, 8 deletions
| diff --git a/mutator-lvl0.cpp b/mutator-lvl0.cpp index 2be95af..b88eff3 100644 --- a/mutator-lvl0.cpp +++ b/mutator-lvl0.cpp @@ -5271,15 +5271,15 @@ public:      }      /*end of 19.4*/ -    if (MacroNameString == "offsetof" && SM.isInSystemHeader(DMD->getLocation())) +    if (MacroNameString == "offsetof")      { -      if (Devi::IsTheMatchInSysHeader(CheckSystemHeader, SM, SL)) +      if (Devi::IsTheMatchInSysHeader(CheckSystemHeader, SM, MDSL))        {          /*intentionally left blank*/        }        else        { -        if (Devi::IsTheMatchInMainFile(MainFileOnly, SM, SL)) +        if (Devi::IsTheMatchInMainFile(MainFileOnly, SM, MDSL))          {            std::cout << "20.6:" << "use of offsetof is illegal:";            std::cout << Range.getBegin().printToString(SM) << ":" << std::endl; @@ -5290,15 +5290,15 @@ public:        }      } -    if (MacroNameString == "setjmp" && SM.isInSystemHeader(DMD->getLocation())) +    if (MacroNameString == "setjmp")      { -      if (Devi::IsTheMatchInSysHeader(CheckSystemHeader, SM, SL)) +      if (Devi::IsTheMatchInSysHeader(CheckSystemHeader, SM, MDSL))        {          /*intentionally left blank*/        }        else        { -        if (Devi::IsTheMatchInMainFile(MainFileOnly, SM, SL)) +        if (Devi::IsTheMatchInMainFile(MainFileOnly, SM, MDSL))          {            std::cout << "20.7:" << "use of setjmp is illegal:";            std::cout << Range.getBegin().printToString(SM) << ":" << std::endl; @@ -5311,14 +5311,14 @@ public:      if (!DMD->isDefined())      { -      if (Devi::IsTheMatchInSysHeader(CheckSystemHeader, SM, SL)) +      if (Devi::IsTheMatchInSysHeader(CheckSystemHeader, SM, MDSL))        {          /*intentionally left blank*/        }        else        {          /*@DEVI-by the time we get a callback on our callback, the macri is assigned a default vlaue even if it is undefined in the TU.*/ -        if (Devi::IsTheMatchInMainFile(MainFileOnly, SM, SL)) +        if (Devi::IsTheMatchInMainFile(MainFileOnly, SM, MDSL))          {            std::cout << "19.11:" << "Use of undefined macro:";            std::cout << Range.getBegin().printToString(SM) << ":" << std::endl; | 
