aboutsummaryrefslogtreecommitdiffstats
path: root/mutator-lvl0.cpp
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2017-07-16 05:50:46 +0000
committerbloodstalker <thabogre@gmail.com>2017-07-16 05:50:46 +0000
commita6c60fe200e8175bbd8ce4685e2c5b3427a2816f (patch)
tree4d4ab1c0b51e13a29642bfd3cf6549856d9fa2c2 /mutator-lvl0.cpp
parentadded a pp check due to api changes (diff)
downloadmutator-a6c60fe200e8175bbd8ce4685e2c5b3427a2816f.tar.gz
mutator-a6c60fe200e8175bbd8ce4685e2c5b3427a2816f.zip
added a pp check due to api changes
Diffstat (limited to 'mutator-lvl0.cpp')
-rw-r--r--mutator-lvl0.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/mutator-lvl0.cpp b/mutator-lvl0.cpp
index 606b0c2..4b60f39 100644
--- a/mutator-lvl0.cpp
+++ b/mutator-lvl0.cpp
@@ -7220,7 +7220,11 @@ public:
{
/*@DEVI-Macro args are passed twice. first they are expanded and then the whole macro,
including the args is checked again for expansion, so args are passed twice.*/
+#if __clang_major__ == 4
if (MI->getNumArgs() != Args->getNumArguments() - MI->getNumArgs())
+#elif __clang_major__ == 5
+ if (MI->getNumArgs() != Args->getNumMacroArguments() - MI->getNumArgs())
+#endif
{
if (Devi::IsTheMatchInSysHeader(CheckSystemHeader, SM, MDSL))
{
@@ -7231,7 +7235,11 @@ public:
if (Devi::IsTheMatchInMainFile(MainFileOnly, SM, MDSL))
{
std::cout << "19.8:" << "Funciton-like macro invoked with wrong number of arguments:";
+#if __clang_major__ == 4
std::cout << Range.getBegin().printToString(SM) << ":" << Args->getNumArguments() << " " << MI->getNumArgs() << ":" << "\n";
+#elif __clang_major__ == 5
+ std::cout << Range.getBegin().printToString(SM) << ":" << Args->getNumMacroArguments() << " " << MI->getNumArgs() << ":" << "\n";
+#endif
XMLDocOut.XMLAddNode(SM, SL, "19.8", "Funciton-like macro invoked with wrong number of arguments:");
JSONDocOUT.JSONAddElement(SM, SL, "19.8", "Funciton-like macro invoked with wrong number of arguments:");