Solved changing a parameter in calling function method_decl.
const TagDecl *tagDecl = dyn_cast<TagDecl>(decl);
const DeclContext *declCont = tagDecl->castToDeclContext(tagDecl);
output="";
const TagDecl *tagDecl = dyn_cast<TagDecl>(decl);
const DeclContext *declCont = tagDecl->castToDeclContext(tagDecl);
output="";
+ std::cout<<state<<std::endl;
for (DeclContext::decl_iterator i = declCont->decls_begin(), e = declCont->decls_end(); i != e; ++i)
{
for (DeclContext::decl_iterator i = declCont->decls_begin(), e = declCont->decls_end(); i != e; ++i)
{
if (i->getKind()==26) // typedefs
{
if (i->getKind()==26) // typedefs
{
output = x.str();
line = clean_spaces(cut_type(output));
ret = find_transitions(state,line);
output = x.str();
line = clean_spaces(cut_type(output));
ret = find_transitions(state,line);
- if(i->getKind()==35) method_decl(decl);// C++ method
+ if(i->getKind()==35) method_decl(*i);// C++ method
{
string output, line, event;
llvm::raw_string_ostream x(output);
{
string output, line, event;
llvm::raw_string_ostream x(output);
if(decl->hasBody())
{
decl->print(x);
if(decl->hasBody())
{
decl->print(x);
- line = get_return(x.str());
+ line = get_return(x.str());
+ //std::cout<<"metodass"<<std::endl;
const FunctionDecl *fDecl = dyn_cast<FunctionDecl>(decl);
const ParmVarDecl *pvd = fDecl->getParamDecl(0);
QualType qt = pvd->getOriginalType();
const FunctionDecl *fDecl = dyn_cast<FunctionDecl>(decl);
const ParmVarDecl *pvd = fDecl->getParamDecl(0);
QualType qt = pvd->getOriginalType();