Skip to content

Commit

Permalink
Fix specHasBody()
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethLamar authored Oct 23, 2024
1 parent ff8d719 commit 51327bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lcom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <Rose/CommandLine.h>
#include <Sawyer/CommandLine.h>
#include "sageInterface.h"

#include <boost/filesystem.hpp>
#include <cassert>
Expand All @@ -16,6 +17,8 @@
#include "lcom.hpp"
#include "traverse.hpp"

namespace si = SageInterface;

// using Class = SgAdaPackageSpec*;
using Method = Traverse::MType;
using Attribute = Traverse::AType;
Expand Down Expand Up @@ -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 <typename C>
std::string ProcessLCOM(SgProject* project) {
Expand Down

0 comments on commit 51327bd

Please sign in to comment.