diff --git a/src/lcom.cpp b/src/lcom.cpp index 06638fc..5f44ccb 100755 --- a/src/lcom.cpp +++ b/src/lcom.cpp @@ -3,6 +3,7 @@ #include #include +#include "sageInterface.h" #include #include @@ -16,6 +17,8 @@ #include "lcom.hpp" #include "traverse.hpp" +namespace si = SageInterface; + // using Class = SgAdaPackageSpec*; using Method = Traverse::MType; using Attribute = Traverse::AType; @@ -136,7 +139,7 @@ std::string sourceLocation(const SgLocatedNode* n, const std::string& alt) */ bool specHasBody(const SgNode*) { return true; } -bool specHasBody(const SgAdaPackageSpec* spec) { return spec->get_body() != nullptr; } +bool specHasBody(const SgAdaPackageSpec* spec) { return si::Ada::getBodyDefinition(spec) != nullptr; } template std::string ProcessLCOM(SgProject* project) {